winget-cli: Failed in attempting to update the source: winget - No applicable installer found

Brief description of your issue

Unable to install a package:

> winget install --id Microsoft.MouseandKeyboardCenter --scope machine
Failed in attempting to update the source: winget
No applicable installer found; see logs for more details.

Logs:

2022-04-22 16:10:09.872 [CORE] WinGet, version [1.2.10271], activity [{B6E9B799-E878-4BA0-BB83-D743226DD51D}]
2022-04-22 16:10:09.873 [CORE] OS: Windows.Desktop v10.0.22000.613
2022-04-22 16:10:09.873 [CORE] Command line Args: "C:\Users\username\AppData\Local\Microsoft\WindowsApps\winget.exe" install --id Microsoft.MouseandKeyboardCenter --scope machine
2022-04-22 16:10:09.873 [CORE] Package: Microsoft.DesktopAppInstaller v1.17.10271.0
2022-04-22 16:10:09.873 [CORE] IsCOMCall:0; Caller: winget-cli
2022-04-22 16:10:09.878 [CLI ] WinGet invoked with arguments: 'install' '--id' 'Microsoft.MouseandKeyboardCenter' '--scope' 'machine'
2022-04-22 16:10:09.879 [CLI ] Found subcommand: install
2022-04-22 16:10:09.879 [CLI ] Leaf command to execute: root:install
2022-04-22 16:10:09.884 [CLI ] Executing command: install
2022-04-22 16:10:09.884 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2022-04-22 16:10:09.884 [REPO] Default source requested, multiple sources available, adding all to source references.
2022-04-22 16:10:09.884 [REPO] Adding to source references msstore
2022-04-22 16:10:09.884 [REPO] Adding to source references winget
2022-04-22 16:10:09.885 [REPO] Source past auto update time [5 mins]; it has been at least 2588 mins
2022-04-22 16:10:10.205 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2022-04-22 16:10:10.205 [CORE] Found matching extension.
2022-04-22 16:10:10.212 [CORE] Downloading to path: C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2022-04-22 16:10:10.213 [CORE] Started applying motw to C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2022-04-22 16:10:10.218 [CORE] Finished applying motw
2022-04-22 16:10:10.218 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/source.msix
2022-04-22 16:10:10.261 [CORE] Download completed.
2022-04-22 16:10:10.262 [CORE] Starting AddPackage operation #0: file:///C:/Users/username/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix SkipSmartScreen: 1
2022-04-22 16:10:10.267 [CORE] Begin waiting for operation #0
2022-04-22 16:10:10.267 [CORE] Begin blocking for operation #0
2022-04-22 16:10:10.270 [CORE] Deployment operation #0: Access is denied.

2022-04-22 16:10:10.270 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF91C9B657A: (caller: 00007FF91C9B6C09) Exception(1) tid(3e24) A2C22CC0     Msg:[Operation failed: Access is denied.
] 

2022-04-22 16:10:10.282 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(53)\WindowsPackageManager.dll!00007FF91CB102B1: (caller: 00007FF91CA0AA56) LogHr(1) tid(3e24) A2C22CC0     Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF91C9B657A: (caller: 00007FF91C9B6C09) Exception(1) tid(3e24) A2C22CC0     Msg:[Operation failed: Access is denied.
] 
] 

2022-04-22 16:10:10.282 [REPO] Source add/update failed, waiting a bit and retrying: winget
2022-04-22 16:10:12.487 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2022-04-22 16:10:12.487 [CORE] Found matching extension.
2022-04-22 16:10:12.491 [CORE] Downloading to path: C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2022-04-22 16:10:12.492 [CORE] Started applying motw to C:\Users\username\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2022-04-22 16:10:12.493 [CORE] Finished applying motw
2022-04-22 16:10:12.493 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/source.msix
2022-04-22 16:10:12.516 [CORE] Download completed.
2022-04-22 16:10:12.517 [CORE] Starting AddPackage operation #1: file:///C:/Users/username/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix SkipSmartScreen: 1
2022-04-22 16:10:12.519 [CORE] Begin waiting for operation #1
2022-04-22 16:10:12.519 [CORE] Begin blocking for operation #1
2022-04-22 16:10:12.523 [CORE] Deployment operation #1: Access is denied.

2022-04-22 16:10:12.523 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF91C9B657A: (caller: 00007FF91C9B6C09) Exception(2) tid(3e24) A2C22CC0     Msg:[Operation failed: Access is denied.
] 

2022-04-22 16:10:12.533 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(516)\WindowsPackageManager.dll!00007FF91CB0FA23: (caller: 00007FF91C91B9AD) LogHr(2) tid(3e24) A2C22CC0     Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\Deployment.cpp(54)\WindowsPackageManager.dll!00007FF91C9B657A: (caller: 00007FF91C9B6C09) Exception(2) tid(3e24) A2C22CC0     Msg:[Operation failed: Access is denied.
] 
] 

2022-04-22 16:10:12.533 [REPO] Failed to update source: winget
2022-04-22 16:10:12.533 [REPO] Multiple sources available, creating aggregated source.
2022-04-22 16:10:12.533 [REPO] Adding to aggregated source: msstore
2022-04-22 16:10:12.533 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2022-04-22 16:10:12.612 [REPO] Response status: 200
2022-04-22 16:10:12.612 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2022-04-22 16:10:12.647 [REPO] Response status: 200
2022-04-22 16:10:12.647 [REPO] Adding to aggregated source: winget
2022-04-22 16:10:12.655 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2022-04-22 16:10:12.656 [CORE] Found matching extension.
2022-04-22 16:10:12.686 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2022.412.2240.845_neutral__8wekyb3d8bbwe\Public\index.db'
2022-04-22 16:10:12.686 [SQL ] Opening SQLite connection: 'file:/C:/Program Files/WindowsApps/Microsoft.Winget.Source_2022.412.2240.845_neutral__8wekyb3d8bbwe/Public/index.db?immutable=1' [1, 40]
2022-04-22 16:10:12.687 [REPO] Opened SQLite Index with version [1.3], last write [2022-04-12 17:40:46.000]
2022-04-22 16:10:12.753 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/packageManifests/Microsoft.MouseandKeyboardCenter?Market=US
2022-04-22 16:10:12.777 [REPO] Response status: 200
2022-04-22 16:10:12.783 [CLI ] Found one app. App id: Microsoft.MouseandKeyboardCenter App name: Microsoft Mouse and Keyboard Center
2022-04-22 16:10:12.784 [REPO] Downloading manifest
2022-04-22 16:10:12.784 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/manifests/m/Microsoft/MouseandKeyboardCenter/14.41.137.0/6ada-Microsoft.MouseandKeyboardCenter.yaml
2022-04-22 16:10:12.802 [CORE] Download hash: a8719117212084c3ed4b72d51e1d7d9e1949c5c900eab9f0962603a30b4d6da0
2022-04-22 16:10:12.802 [CORE] Download completed.
2022-04-22 16:10:12.803 [CLI ] Manifest fields: Name [Microsoft Mouse and Keyboard Center], Version [14.41.137.0]
2022-04-22 16:10:12.804 [CLI ] Starting installer selection.
2022-04-22 16:10:12.804 [CLI ] Installer [X64,exe,Unknown,] not applicable: Installer scope does not match required scope: Unknown != Machine
2022-04-22 16:10:12.804 [CLI ] Installer [X86,exe,Unknown,] not applicable: Installer scope does not match required scope: Unknown != Machine
2022-04-22 16:10:12.804 [CLI ] Installer [Arm64,exe,Unknown,] not applicable: Installer scope does not match required scope: Unknown != Machine
2022-04-22 16:10:12.804 [CLI ] Installer [Arm64,exe,Unknown,] not applicable: Machine is not compatible with Arm64
2022-04-22 16:10:12.805 [CLI ] Terminating context: 0x8a150010 at D:\a\_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:74

Steps to reproduce

Try to install a package.

Expected behavior

Package gets installed

Actual behavior

Error.

Environment

> winget --info
Windows Package Manager v1.2.10271
Windows: Windows.Desktop v10.0.22000.613
Package: Microsoft.DesktopAppInstaller v1.17.10271.0

About this issue

Most upvoted comments

What about running winget source reset --force and then running winget source update with administrator privileges?

If that’s all it takes to break winget then maybe make it more resilient?

There are various third-party applications that can sometimes break your OS files / registry entries into bits and pieces even if you never touched or never installed CCleaner before.

It’ll also break more than just WinGet so other applications could be impacted without you knowing about it.

I’m actually not even sure if I wanna install whatever you linked there, I’m that cautious.

It’s the exact same Download URL that you shared in your original post as part of your error logs but you can also run winget source reset --force to redeploy the source file.

Not sure what you mean. There isn’t even a Store in Sandbox.

WinGet can be manually installed via the Add-AppxPackage command if there’s an issue you want to reproduce so you don’t realistically need the Microsoft Store to be installed in Windows Sandbox to use WinGet.

You could try to reproduce your issue there if you wanted to and check what the outcome is. I’m not able to do this because I cannot reproduce this issue.

If I need to resort to an in-place upgrade a week into a clean install and cautious usage then there is something seriously wrong and will break again a week after.

Not uncommon.

There was a user who blamed WinGet for breaking their OS when in theory it was caused by the user (https://github.com/microsoft/winget-cli/issues/1005) while other issues are related to CCleaner breaking OS installation.

Sometimes there’s just a lot variables on how issues like this can happen because of how complex Windows is.

If you’ve already tried to redeploy the source file by running winget source reset --force and winget source update with administrator privileges but you’re still seeing Access is denied. then I’m afraid that you’ll have to do an in-place upgrade using an ISO image.

I’m not really that careful with my installation of Windows but I have yet to see anything break on my end even though I’m running Insider Preview builds of Windows 11.

Although you mentioned that it’s a 1-week old installation, I’m more talking about a 5-minute old installation which I was able to achieve via Hyper-V using a VHDX file to provide you a quick PoC.

I don’t know what exactly caused this issue other than the fact that it’s definitely an issue on your end because Access is denied. is more or less impossible to achieve on a 5-minute old install of Windows 11.

I mean… I have Steam, VS Code, OBS, a couple more programs and Store apps. All reputable. I’m very minimal with my Windows installs and diligent with maintaining them and not doing anything breaking. And like I said it’s about a week old. If that’s all it takes to break winget then maybe make it more resilient? Because I can guarantee you most people are way less minimal with their systems.

I’m actually not even sure if I wanna install whatever you linked there, I’m that cautious.

C:\Users\%USERNAME%\AppData\Local\Temp and %SystemRoot%\Temp

Haven’t touched either of those.

Also by clean installation I’m referring to installing Windows 11 via an ISO image / VHDX file and then running Microsoft Store’s “Get updates” button to get the latest version of the Windows Package Manager

That is also what I meant and what I did (in addition to Windows Updates).

You will also probably run into the same issue in Windows Sandbox

Not sure what you mean. There isn’t even a Store in Sandbox.

If you think your OS files are somehow corrupted then you can look into rebuilding your OS files by launching setup.exe from an ISO image which will repair your current Windows installations with fresh files.

If I need to resort to an in-place upgrade a week into a clean install and cautious usage then there is something seriously wrong and will break again a week after.

Did you try reproducing on a fully up-to-date Windows install?

Yes I did.

I used the Windows 11 ISO (22000.1) and the Windows 11 VHDX (22000.613) from the build release share and I also downloaded the Windows 11 ISO from https://www.microsoft.com/en-us/software-download/windows11 but still unable to reproduce this issue.

Using the VHDX was faster than ISO because it already included the latest Cumulative Update (CU) and also skips most of the installation phase other than the OOBE for user name, password, etc. All that was left for me were Microsoft Defender Antivirus and .NET Framework 3.5 / 4.8 updates which installed quite fast using Windows Update, and even though it didn’t require a reboot for those two updates, I ended up rebooting anyways.

Using the ISO did take longer than VHDX because it has to go through the installation phase then OOBE then OOBE installs a Cumulative Update (CU) then OOBE again but for username, password, etc. After that I have to install everything, such as 22000.613, in Windows Update and update all of the applications from the Microsoft Store.

These are pictures taken from the VM that used an ISO image which is also the same outcome for VHDX:

Screenshots from ISO (Hyper-V)

image image image image image image image image image

winget source update (logs from DiagOutputDir)
2022-04-26 02:14:20.824 [CORE] WinGet, version [1.2.10271], activity [{1CBC7319-FA6A-4E00-9224-38A8A3798115}]
2022-04-26 02:14:20.826 [CORE] OS: Windows.Desktop v10.0.22000.613
2022-04-26 02:14:20.827 [CORE] Command line Args: winget  source update
2022-04-26 02:14:20.827 [CORE] Package: Microsoft.DesktopAppInstaller v1.17.10271.0
2022-04-26 02:14:20.827 [CORE] IsCOMCall:0; Caller: winget-cli
2022-04-26 02:14:20.833 [CLI ] WinGet invoked with arguments: 'source' 'update'
2022-04-26 02:14:20.833 [CLI ] Found subcommand: source
2022-04-26 02:14:20.833 [CLI ] Found subcommand: update
2022-04-26 02:14:20.833 [CLI ] Leaf command to execute: root:source:update
2022-04-26 02:14:20.834 [CLI ] Executing command: update
2022-04-26 02:14:20.903 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2022-04-26 02:14:20.955 [REPO] Named source requested, found: msstore
2022-04-26 02:14:20.956 [REPO] Named source to be updated, found: msstore
2022-04-26 02:14:21.074 [REPO] Named source requested, found: winget
2022-04-26 02:14:21.076 [REPO] Named source to be updated, found: winget
2022-04-26 02:14:22.483 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2022-04-26 02:14:22.485 [CORE] Downloading to path: C:\Users\WinGet\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix
2022-04-26 02:14:22.495 [CORE] Started applying motw to C:\Users\WinGet\AppData\Local\Temp\WinGet\Microsoft.Winget.Source_8wekyb3d8bbwe.msix with zone: 3
2022-04-26 02:14:22.511 [CORE] Finished applying motw
2022-04-26 02:14:22.511 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/source.msix
2022-04-26 02:14:23.653 [CORE] Download completed.
2022-04-26 02:14:23.653 [CORE] Starting AddPackage operation #0: file:///C:/Users/WinGet/AppData/Local/Temp/WinGet/Microsoft.Winget.Source_8wekyb3d8bbwe.msix SkipSmartScreen: 1
2022-04-26 02:14:23.663 [CORE] Begin waiting for operation #0
2022-04-26 02:14:23.663 [CORE] Begin blocking for operation #0
2022-04-26 02:14:27.721 [CORE] Successfully completed #0
2022-04-26 02:14:27.738 [CLI ] Leaf command succeeded: root:source:update

There’s also a new optional update released today which seems to include a bug fix for MSIX but I don’t know if that’ll change anything: https://www.windowslatest.com/2022/04/26/windows-11-kb5012643-released-heres-everything-new-and-improved/

updates often break things, in which case it should be looked at.

It should be posted in Feedback Hub because the Windows Servicing & Delivery (WSD) team are the ones that manages the production builds of Windows 11 and the Feedback Hub is always being checked by various teams regardless of how many upvotes a particular issue gets.

WSD heavily prioritizes useful bug fixes, security fixes, and some features from the Windows Insider Preview builds into production builds of Windows 11.

If winget distributes software that does what you’re saying then maybe that, again, should be looked at.

I’m sure the developers of those applications are already aware of that due to the amount of complaints they receive.

Also, No applicable installer found; see logs for more details. has been solved because of my pull request: https://github.com/microsoft/winget-pkgs/pull/58663.

I didn’t show it in the VM because that application doesn’t allow VMs to install it but it works fine on my PC running Dev Channel builds: image