Repository navigation
Description
Brief description of your issue
Getting below error while running winget-cli from normal user ( non administrator account)
winget list
Failed in attempting to update the source: winget
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x80070005 : Access is denied.
Steps to reproduce
winget list
Failed in attempting to update the source: winget
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x80070005 : Access is denied.
Expected behavior
List all packages in the machine
Actual behavior
Returned error
C:\Users\Ramana>winget list
Failed in attempting to update the source: winget
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x80070005 : Access is denied.
Environment
C:\Users\Ramana>winget --info
Windows Package Manager v1.8.1911
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.3958
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.0
Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
Activity
github-actions commentedon Aug 5, 2024
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
Closed similar issues:
sajiby3k commentedon Aug 5, 2024
I am seeing this is related to specific normal user. Let's say - you have two users - user1 and user2. For user1 it is not working. Kindly log into another user - user2. And try the same command. In my case for user2 - winget list works. I do not know what permission or files corrupted for user1 - that made winget get permission denied under normal user named - user1. Anyone can shed some light why user1 getting permission deny and how to fix that.
venkee70 commentedon Aug 5, 2024
Solved - based on the another thread.
Cause: the WinGet folder in the windows temp folder of my non-privileged user had - for whatever reason - admin access rights only.
Fix: deleted this WinGet folder, ran winget source update from an non-elevated shell again. Et voilà, a new WinGet folder with proper permissions has been created and everything is fine again. :-)
adamsmith34 commentedon Aug 30, 2024
Thank you for this solution. Specifically, I navigated into the
C:\Users\<user>\AppData\Local\Tempfolder, entered admin credentials, deleted the Temp folder, ranwinget source updatewith no errors, and then winget behaved as expected.marioqxx commentedon Sep 10, 2024
Also thank you for the solution venkee70.
As adamsmith34 I deleted the folder C:\Users<User>\AppData\Local\Temp\Winget, which required Admin-rights.
KKire commentedon Oct 3, 2024
I don't even have that folder in the Temp and still have the same error
DrStrange commentedon Oct 14, 2024
gsudo can cause error 0x80070005:
gerardog/gsudo#376
The UniGetUI package manager uses gsudo:
https://github.com/marticliment/UniGetUI
adamsmith34 commentedon Oct 14, 2024
This is it exactly. Thank you.
ROBYER1 commentedon Oct 28, 2024
Thanks for the solution, I am shocked that Windows doesn't just show the UAC prompt window to delete the admin access only folder in the appdata temp folder when it tries to install from the store?
llvs commentedon Jan 31, 2025
Give a thumbs up to this probable root issue here to get this solved more quickly:
WinGet Database getting corrupted on multi-user systems when using GSudo-like elevation methods