WSL: WSL install hangs due to elevation issue

Version

Microsoft Windows [Version 10.0.22621.674]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

N/A

Distro Version

N/A

Other Software

No response

Repro Steps

This occurred on a fresh machine, where I set it up with a primary user account that has a Microsoft account, which then is an admin. I then created a local user (as a regular user, not an administrator), and signed in as that local user (while leaving the admin session active as well), and ran wsl --install from PowerShell.

Expected Behavior

I should be able to install WSL, using the admin account to approve elevated permissions, staying logged in with the local account.

Actual Behavior

The command hung at the “Installing WSL…” message, without showing the progress bar. A prompt for elevating privileges appeared, which I approved using the admin account’s credentials. The trouble was, there was a second elevation prompt for Windows Host Services that wasn’t appearing there in the local account, only in the admin account’s session when I switched back to it. Even approving there, and switching back to the local account session, the installation stopped hanging but said the elevation failed.

This was solved by making my local user an admin; approving the first elevation prompt with the local account’s credentials then caused the second prompt to appear there as well and installation completed.

Diagnostic Logs

No response

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 3
  • Comments: 17 (3 by maintainers)

Most upvoted comments

Yah agreed, it’s not ideal (the second prompt really shouldn’t be needed). That one is coming from the app platform when installing the WSL msix package. We’ve filed a bug on them to not pop that dialog if the calling process is already elevated. I’ll check on the status of that.

Adding my name to the pile on trying to use “wsl --update” after WSL OS is installed and reboots completed, but the HPWS popup makes that a non-starter

Any news on this UAC issue to be able to install WSL in the OSD process (with MDT, Config Manager, etc.)?

https://youtu.be/QgdMSswiS5o

Thanks.

Any solution to avoid this UAC for “Host Process for Windows Services”?

We want to install WSL for our users using MECM (SCCM) but this UAC makes it impossible for users that do not have an admin account.

Yeah thats not really an option for us given our demographic of users is a small slice of overall population so WSL (VMP, WSL OS, kernel, and WSL MSIX package) is always post-deploy. MSI based we are already rolling with in Company Portal without the UAC issue as a Win32 app that does it all. It just means the normal version chase though winget is helping there.

Preference though is to be able to use the Store copy via the CP/Store integration to lower that maintenance for the custom script.

Any updates here? I am encountering this when running the install from the MS Store, from a non-elevated command prompt, and from an elevated command prompt. Problem is that it’s a corporate machine and I do not have the credentials for the admin user the UAC prompt is for.