Skip to content

Error 0x80070005 for non-admin user operations like search and install #6242

@leaumar

Description

@leaumar

Relevant area(s)

WinGet CLI

Relevant command(s)

winget search

Brief description of your issue

Since several months now, my winget has been broken out of the blue after 2 or 3 years of active use: running asearch or install as non-admin (as one does) started throwing vague errors and failing. The actual issue appears to be a permission problem because search actually fails on writing away the downloaded sources update: it completes to 100%, then hangs for 5 seconds and errors out with Failed in attempting to update the source: winget, and basically the same thing happens with install. I cannot install any .msix files from explorer, the GamingRepairTool fails to fix Gaming Services with 0x80070005 (the tail end of a wild goose chase), the xbox app (another goose chase) opens to a screen with 0x80070005.

Besides Add-AppxPackage: Deployment failed with HRESULT: 0x80070005, Access is denied. error 0x80070005: Opening the package from location Microsoft.Winget.Source_8wekyb3d8bbwe.msix failed., the only useful information I've gotten out of winget so far is Please check whether the Msixvc support services are installed, and I don't know what that is nor can I find meaningful repair instructions online (or any that work or aren't the same as the other stuff I've tried).

Crucially, everything works fine when I do it from an admin shell. The root cause may have been the use of unigetui at an unlucky time regarding a gsudo bug or I don't know what. I have 2 other PCs with basically the same setups and they've never had an issue. If the index is updated by a source reset or update from an admin shell, issues go away for my regular account for a few hours, until winget decides its cached index is stale again.

I've already spent two dozen hours in total trying to fix this using every article, blog post, and reddit comment google has in its index. I've

  • uninstalled and reinstalled more stuff (winget packages, appx things, msix files, with and without admin rights or -AllUsers) than I can remember
  • changed the winget source url, reset sources
  • run every command under the sun with appx and other words I don't know in the name (I'm not hopelessly dumb and not running rm -rf system32, but it's not like I have any idea what appx is or what its requirements of the filesystem are)
  • reset folder permissions, deleted the Temp/winget folders (unigetui gsudo issue fix)
  • deleted junk folders
  • DISM restorehealth etc
  • sfc scannow
  • the windows repair install twice
  • windowsAppsUnfukker
  • wsreset
  • repair-WinGetPackageManager -Force -Latest

Nothing has helped.

Claude has also been gnawing on it for hundreds of thousands of tokens, making me run hundreds of queries on the registry, dir permissions checks, log reads, powershell scripts to validate stuff. Much of its work has been utter nonsense that I'm sure was never relevant, but it does also seem to have done a number of useful sanity checks like folder permissions, though I've caught it making plenty stuff up there too. I'm just saying, it's not an issue so obvious or well documented that claude knows of it, since it's resorting to boatloads of hallucinations instead.

Please help with your subject knowledge. It's probably just 1 folder somewhere that has an incorrect permission, it will be something that trivial. Unfortunately I just don't see useful info in the logs besides access being denied to C:\Users\Marnes\AppData\Local\Temp\WinGet and I don't know what the correct permissions for that folder and its parents are supposed to be, or how to find underlying issues.

Thank you

2026-05-21 21:32:25.793 [CORE] WinGet, version [1.28.240], activity [{4C7F4110-3567-428B-B0E5-3862E4B5963F}]
2026-05-21 21:32:25.794 [CORE] Process: winget.exe[23832], Offset: 00007FF89B370000
2026-05-21 21:32:25.794 [CORE] OS: Windows.Desktop v10.0.26200.8457
2026-05-21 21:32:25.794 [CORE] Command line Args: C:\Users\Marnes\AppData\Local\Microsoft\WindowsApps\winget.exe source update
2026-05-21 21:32:25.794 [CORE] Package: Microsoft.DesktopAppInstaller v1.28.240.0
2026-05-21 21:32:25.794 [CORE] IsCOMCall:0; Caller: winget-cli
2026-05-21 21:32:25.805 [CLI ] WinGet invoked with arguments: 'source' 'update'
2026-05-21 21:32:25.805 [CLI ] Found subcommand: source
2026-05-21 21:32:25.805 [CLI ] Found subcommand: update
2026-05-21 21:32:25.805 [CLI ] Leaf command to execute: root:source:update
2026-05-21 21:32:25.807 [CLI ] Executing command: update
2026-05-21 21:32:25.848 [REPO] Named source requested, found: msstore
2026-05-21 21:32:25.848 [CORE] Default proxy is not set
2026-05-21 21:32:25.848 [REPO] REST HTTP Client helper does not use proxy
2026-05-21 21:32:25.849 [REPO] Named source to be updated, found: msstore
2026-05-21 21:32:25.952 [REPO] Named source requested, found: winget
2026-05-21 21:32:25.953 [REPO] Named source to be updated, found: winget
2026-05-21 21:32:25.984 [CORE] Examining extension: PFN = Microsoft.Winget.Fonts.Source_8wekyb3d8bbwe, ID = IndexDB
2026-05-21 21:32:25.984 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2026-05-21 21:32:26.239 [CORE] Downloading to path: C:\Users\Marnes\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2026-05-21 21:32:26.240 [CORE] Started applying motw to C:\Users\Marnes\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2026-05-21 21:32:26.243 [CORE] Finished applying motw
2026-05-21 21:32:26.243 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source2.msix
2026-05-21 21:32:26.330 [CORE] Download hash: 6e86daac7fc853adb71e0fc73898572d26bd24573b773c2196ad95a2dab666f5
2026-05-21 21:32:26.330 [CORE] Download completed.
2026-05-21 21:32:26.413 [CORE] Started trust validation of msix at: C:\Users\Marnes\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2026-05-21 21:32:26.460 [CORE] Result for certificate chain validation of Microsoft origin: 0
2026-05-21 21:32:26.502 [CORE] Result for trust info validation of the msix: 0
2026-05-21 21:32:26.502 [CORE] Starting AddPackage operation #0: file:///C:/Users/Marnes/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix Options: { SkipReputationCheck = 1, ExpectedDigests = {} }
2026-05-21 21:32:26.503 [CORE] Begin waiting for operation #0
2026-05-21 21:32:26.503 [CORE] Begin blocking for operation #0
2026-05-21 21:32:26.515 [CORE] Deployment operation #0: error 0x80070005: Opening the package from location Microsoft.Winget.Source_8wekyb3d8bbwe.msix failed.
2026-05-21 21:32:26.515 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF89B6A8192: (caller: 00007FF89B6A3678) Exception(1) tid(a10) 80070005 Access is denied.
Msg:[Operation failed: error 0x80070005: Opening the package from location Microsoft.Winget.Source_8wekyb3d8bbwe.msix failed.]
2026-05-21 21:32:26.522 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(96)\WindowsPackageManager.dll!00007FF89B824585: (caller: 00007FF89B705BA4) LogHr(1) tid(a10) 80070005 Access is denied.
Msg:[C:__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF89B6A8192: (caller: 00007FF89B6A3678) Exception(1) tid(a10) 80070005 Access is denied.
Msg:[Operation failed: error 0x80070005: Opening the package from location Microsoft.Winget.Source_8wekyb3d8bbwe.msix failed.]
]
2026-05-21 21:32:26.522 [REPO] Source add/update failed, waiting 5105 milliseconds and retrying: winget
2026-05-21 21:32:31.641 [CORE] Examining extension: PFN = Microsoft.Winget.Fonts.Source_8wekyb3d8bbwe, ID = IndexDB
2026-05-21 21:32:31.641 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2026-05-21 21:32:31.653 [CORE] Downloading to path: C:\Users\Marnes\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2026-05-21 21:32:31.654 [CORE] Started applying motw to C:\Users\Marnes\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2026-05-21 21:32:31.655 [CORE] Finished applying motw
2026-05-21 21:32:31.655 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/source2.msix
2026-05-21 21:32:31.658 [CORE] Download hash: 6e86daac7fc853adb71e0fc73898572d26bd24573b773c2196ad95a2dab666f5
2026-05-21 21:32:31.658 [CORE] Download completed.
2026-05-21 21:32:31.706 [CORE] Started trust validation of msix at: C:\Users\Marnes\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2026-05-21 21:32:31.755 [CORE] Result for certificate chain validation of Microsoft origin: 0
2026-05-21 21:32:31.788 [CORE] Result for trust info validation of the msix: 0
2026-05-21 21:32:31.788 [CORE] Starting AddPackage operation #1: file:///C:/Users/Marnes/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix Options: { SkipReputationCheck = 1, ExpectedDigests = {} }
2026-05-21 21:32:31.788 [CORE] Begin waiting for operation #1
2026-05-21 21:32:31.788 [CORE] Begin blocking for operation #1
2026-05-21 21:32:31.800 [CORE] Deployment operation #1: error 0x80070005: Opening the package from location Microsoft.Winget.Source_8wekyb3d8bbwe.msix failed.
2026-05-21 21:32:31.800 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF89B6A8192: (caller: 00007FF89B6A3678) Exception(2) tid(a10) 80070005 Access is denied.
Msg:[Operation failed: error 0x80070005: Opening the package from location Microsoft.Winget.Source_8wekyb3d8bbwe.msix failed.]
2026-05-21 21:32:31.806 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(972)\WindowsPackageManager.dll!00007FF89B8252F7: (caller: 00007FF89B5B274A) LogHr(2) tid(a10) 80070005 Access is denied.
Msg:[C:__w\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF89B6A8192: (caller: 00007FF89B6A3678) Exception(2) tid(a10) 80070005 Access is denied.
Msg:[Operation failed: error 0x80070005: Opening the package from location Microsoft.Winget.Source_8wekyb3d8bbwe.msix failed.]
]
2026-05-21 21:32:31.806 [REPO] Failed to update source: winget
2026-05-21 21:32:31.807 [REPO] Named source requested, found: winget-font
2026-05-21 21:32:31.807 [REPO] Named source to be updated, found: winget-font
2026-05-21 21:32:31.812 [CORE] Examining extension: PFN = Microsoft.Winget.Fonts.Source_8wekyb3d8bbwe, ID = IndexDB
2026-05-21 21:32:31.812 [CORE] Found matching extension.
2026-05-21 21:32:31.921 [CLI ] Leaf command succeeded: root:source:update

Steps to reproduce

winget search <anything>

Expected behavior

Winget updates its sources and works

Actual behavior

Hangs on 100% index download and then times out

Failed in attempting to update the source: winget

Environment

Windows Package Manager v1.28.240
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.26200.8457
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.28.240.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
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
Configuration Modules              %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-SearchIssue related to WinGet SearchIssue-BugIt either shouldn't be doing this or needs an investigation.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions