-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work from elevated command prompt #1011
Comments
Anything; winget won't even run in an elevated prompt. From a non-elevated prompt any install or upgrade gets an access denied error, or silently fails. I'll go through the feedback hub. PS C:\WINDOWS\system32> winget
At line:1 char:1
|
I'm seeing this on corporate machine where my regular account doesn't have 'administrator' privilege. To do admin tasking, I start C:\> where winget.exe
C:\Users\rXXX\AppData\Local\Microsoft\WindowsApps\winget.exe
C:\> dir C:\Users\rXXX\AppData\Local\Microsoft\WindowsApps\winget.exe
Volume in drive C is Windows
Directory of C:\Users\rXXX\AppData\Local\Microsoft\WindowsApps
05/31/2021 10:34 AM 0 winget.exe
1 File(s) 0 bytes
0 Dir(s) 298,889,244,672 bytes free
C:\> C:\Users\rXXX\AppData\Local\Microsoft\WindowsApps\winget.exe
The system cannot execute the specified program. It seems that If I run |
@KineticTheory, the zero byte size file is fine. It's related to the App Execution Alias. I believe you will need to have the App Installer registered under the other administrator account for this scenario to work currently. |
@denelon This is not my experience. I can logon to my machine as the admin-class user and |
I'm not sure how well the AEA (App Execution Alias) works when running from the context of a user that is not actually logged in. I don't know if that is the issue here, but this setup is certainly going to cause issues if you run installers that are user specific in that context. Not that you would normally need to do that, as the elevated privileges are usually only needed for system wide installs (although not always). But this would be an issue for the installer with any over the shoulder authorization. |
We've published the v1.1 release candidate and updated our troubleshooting guide. Can you confirm if this is still happening? |
I believe I have a related use case / issue with MSIX: Again, scenario is that I am logged in as "myUser" without admin rights. I run cmd.exe or powershell.exe using right-click "Run as administrator" and elevate as the different "adminUser". I get "The system cannot execute the specified program." or "Program 'winget.exe' failed to run: The file cannot be accessed by the system" depending on the shell.
If I log in directly as "adminUser", winget runs as expected whether elevated or not. |
I also believe the root of the Issue here is related to how MSIX packages are provisioned for users. This isn't something we're going to be able to change. We've got work related to this: It's going to require installing a separate package that we will be releasing to expose the COM interface to "in process" applications. Keep your eye on that Issue as we're actively working on it. |
Brief description of your issue
Steps to reproduce
Try to install an app. Fails. Try to install from elevated prompt. Fails.
Expected behavior
Install the app
Actual behavior
Fails
Environment
Windows Package Manager v1.0.11451
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19042.985
Package: Microsoft.DesktopAppInstaller v1.11.11451.0
Any other software?
The text was updated successfully, but these errors were encountered: