-
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
Can't run winget.exe: "Access is denied" #1328
Comments
Sorry to hear that. My guess is you may not have read permission which seems odd. Can you run the following and provide me the output? Finally, while we are digging into this, feel freed to file a feedback hub issue as this will produce LOGS I can make a dev look at. |
@rasa this issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
@rasa this issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
I'm hitting an identical issue: where winget dir C:\Users\jfole\AppData\Local\Microsoft\WindowsApps Directory of C:\Users\jfole\AppData\Local\Microsoft\WindowsApps 10/09/2021 11:41 AM Backup10/02/2021 10:30 PM 0 GameBarElevatedFT_Alias.exe 10/09/2021 11:36 AM Microsoft.DesktopAppInstaller_8wekyb3d8bbwe 06/08/2021 11:37 PM Microsoft.MicrosoftEdge_8wekyb3d8bbwe 08/13/2021 06:43 PM Microsoft.SkypeApp_kzf8qxf38zg5c 10/09/2021 11:41 AM Microsoft.WindowsTerminal_8wekyb3d8bbwe 10/02/2021 10:30 PM Microsoft.XboxGamingOverlay_8wekyb3d8bbwe 04/15/2021 01:11 AM 0 MicrosoftEdge.exe 10/09/2021 11:36 AM 0 python.exe 10/09/2021 11:36 AM 0 python3.exe 08/13/2021 06:43 PM 0 Skype.exe 10/01/2021 05:00 PM 0 Spotify.exe 10/01/2021 05:00 PM SpotifyAB.SpotifyMusic_zpdnekdrzrea0 10/09/2021 11:36 AM 0 winget.exe 10/09/2021 11:41 AM 0 wt.exe 8 File(s) 0 bytes 7 Dir(s) 395,438,116,864 bytes free powershell Get-AppxPackage microsoft.DesktopAppInstaller Name : Microsoft.DesktopAppInstaller Feedback Hub report filed: https://aka.ms/AAe01u7 |
@rasa have you taken a look at our troubleshooting steps? We've recently added a section with some PowerShell commands that may help resolve the issue. |
@pefoley2, I know it has been a while, but from your feedback logs it looks like an issue in the OS itself. I have forwarded to the correct team. Rebooting should resolve the issue if you encounter it again (and yes, I know how that sounds coming from a Microsoft employee 😄 ). |
I still have this issue. The troubleshooting steps did not help. Additionally, on a different Windows 10 Pro x64 fully patched system, I have been getting |
@rasa we've released Windows Package Manager 1.3. Is this still happening? |
I gave up fighting installing winget months ago. I spent many many hours, but couldn't work around the Now, I simply type I find it ironic that I had to use another packaging tool to successfully use this packaging tool. Hopefully 1.3 has addressed these issues. I will leave this issue open as others are feeling my pain, but feel free to close it, as I've moved on. (Full disclosure: I am a scoop maintainer) |
@rasa thanks for responding! The irony isn't lost on me either. We've had quite a few challenges working through the incantations to get everything working correctly. There have been a mixture of issues related to the fact that winget is delivered via App Installer and we're currently depending on an update from the store. This problem should gradually go away with newer updates to both App Installer and Windows. I'm going to go ahead and close this, but the history will be preserved for others to find. Also, it's worth noting MSIX packages aren't available to system context calls. They were designed to be registered upon interactive login, and our path forward for system / remote execution is via a COM API we're developing as a part of the Integration for Intune, third-party MDM providers, and the native PowerShell implementation. |
You likely have multiple instances of winget.exe in your system’s $PATH. To resolve this, consider cleaning up your PATH variable or directly calling the correct executable file |
@alinaimi In my case, I didn't, but that might help others who encounter this issue. |
Since I stumbled on this while trying to automate install of .NET runtimes, I'll throw in the research I found: Right after installing winget I was getting the This seemed strange to me as there were troubleshooting steps I would try and it would work, and when I'd try them again they wouldn't work. So I wrote a loop to attempt opening winget every 5 seconds to see if after a certain amount of time the error would go away. It turns out it did - 10 to 15 minutes after the initial install. I checked in the Event Log to attempt to correlate this to any service starts, and I noticed the AppX Deployment service restarted right before the error went away. I tried restarting that service after install but that didn't work - only time seemed to resolve this. IDK if this would be helpful for anyone finding this in the future. I will note that @rasa 's suggestion of using Scoop worked flawlessly. (Turned out that I didn't need the .NET runtimes, but rather the .NET web hosting pack, which I couldn't find on winget and ended up using Chocolatey for my install.) The script I used to install, then loop over running winget until it magically started working:
|
Thank you @twglomski ! Your script lines helped getting my winget working on Windows Server 2022 Standard 21H2 (20348.2227), winget v1.6.3482
|
I had the same problem. Deleting folder \Users<user>\AppData\Local\Temp\Winget - which for whatever reason had only Administrator-access-rights as descibed here: solved the problem for me. |
Brief description of your issue
Typing:
c:\> winget
returns
Access is denied
I can run
winget
logged in as the original local administrator user. It's failing when I login as a different user who's also an local adminstrator. I've tried resetting the rights to winget.exe usingtakeout
andicalcs /reset /c /q
, but that didn't help. I've uninstalled/reinstalled it several times, but nothing helps. Can't the installer reset the rights, so it just works?Steps to reproduce
See above.
Expected behavior
winget runs without reporting errors
Actual behavior
See above
Environment
Windows 10 x64 10.0.19042
The text was updated successfully, but these errors were encountered: