Skip to content

Winget incorrectly detects per-user MSI scope (No applicable update found) #3011

Open

Description

@sitiom

Brief description of your issue

I cannot upgrade packages whose MSI installers are under user scope. A No applicable update found is shown despite it showing to be available from the winget upgrade command.

Here are some examples of packages with this issue:

  • Google.IAPDesktop
  • PDFArranger.PDFArranger
  • Dummerle.Rare
  • Mu.Mu
  • RussellBanks.Komac

Steps to reproduce

  1. Install an old version of one of the packages above. For this example, we will use RussellBanks.Komac.
  2. Check available updates via winget upgrade. Komac should show up.
  3. Upgrade the package (winget upgrade RussellBanks.Komac)
  4. See No applicable upgrade found. message.

Log:

2023-02-20 21:31:17.269 [CORE] WinGet, version [1.5.441-preview], activity [{5406AEB0-B779-484D-B465-C2A2EF98C06A}]
2023-02-20 21:31:17.270 [CORE] OS: Windows.Desktop v10.0.25284.1000
2023-02-20 21:31:17.270 [CORE] Command line Args: "C:\Users\vedan\AppData\Local\Microsoft\WindowsApps\winget.exe" upgrade --id RussellBanks.Komac --exact -s winget --open-logs
2023-02-20 21:31:17.270 [CORE] Package: Microsoft.DesktopAppInstaller v1.20.441.0
2023-02-20 21:31:17.270 [CORE] IsCOMCall:0; Caller: winget-cli
2023-02-20 21:31:17.278 [CLI ] WinGet invoked with arguments: 'upgrade' '--id' 'RussellBanks.Komac' '--exact' '-s' 'winget' '--open-logs'
2023-02-20 21:31:17.278 [CLI ] Found subcommand: upgrade
2023-02-20 21:31:17.278 [CLI ] Leaf command to execute: root:upgrade
2023-02-20 21:31:17.294 [CLI ] Executing command: upgrade
2023-02-20 21:31:17.309 [REPO] Named source requested, found: winget
2023-02-20 21:31:17.325 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2023-02-20 21:31:17.325 [CORE] Found matching extension.
2023-02-20 21:31:17.375 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2023.220.1651.303_neutral__8wekyb3d8bbwe\Public\index.db'
2023-02-20 21:31:17.375 [SQL ] Opening SQLite connection #1: 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2023.220.1651.303_neutral__8wekyb3d8bbwe\Public\index.db' [1, 40]
2023-02-20 21:31:17.377 [REPO] Opened SQLite Index with version [1.6], last write [2023-02-20 21:21:06.000]
2023-02-20 21:31:17.686 [REPO] Creating PredefinedInstalledSource with filter [None]
2023-02-20 21:31:17.686 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:'
2023-02-20 21:31:17.686 [SQL ] Opening SQLite connection #2: ':memory:' [6, 0]
2023-02-20 21:31:17.757 [REPO] Reading MSI UpgradeCodes
2023-02-20 21:31:17.758 [REPO] Examining ARP entries for Machine | X64
2023-02-20 21:31:17.776 [REPO] Examining ARP entries for Machine | X86
2023-02-20 21:31:17.854 [REPO] Reading MSI UpgradeCodes
2023-02-20 21:31:17.856 [REPO] Examining ARP entries for User | X64
2023-02-20 21:31:18.315 [REPO] Opening SQLite Index for ReadWrite at 'C:\Users\vedan\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2023-02-20 21:31:18.315 [SQL ] Opening SQLite connection #3: 'C:\Users\vedan\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db' [2, 0]
2023-02-20 21:31:18.317 [REPO] Opened SQLite Index with version [1.6], last write [2023-02-20 20:30:49.000]
2023-02-20 21:31:18.406 [CLI ] Found one app. App id: RussellBanks.Komac App name: Komac
2023-02-20 21:31:18.409 [REPO] Downloading manifest
2023-02-20 21:31:18.409 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/r/RussellBanks/Komac/1.0.4/d166-RussellBanks.Komac.yaml
2023-02-20 21:31:18.459 [CORE] Download hash: 59432829da366f7f6275dad785f4b8495ab9dfc19817ecc2fb8905255038d794
2023-02-20 21:31:18.459 [CORE] Download completed.
2023-02-20 21:31:18.461 [CLI ] Starting installer selection.
2023-02-20 21:31:18.461 [CLI ] Installer [X64,burn,User,en-US] not applicable: Installer scope does not match currently installed scope: User != Machine
2023-02-20 21:31:18.461 [CLI ] Installer [X64,burn,User,en-US] not applicable: Installed package type 'msi' is not compatible with installer type burn
2023-02-20 21:31:18.479 [CLI ] Terminating context: 0x8a15002b at D:\a\_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:a6

Expected behavior

It should successfuly start to upgrade the package.

Actual behavior

A No applicable upgrade found. message is shown despite an upgrade being available.

Environment

Windows Package Manager (Preview) v1.5.441-preview

Windows: Windows.Desktop v10.0.22621.1265
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.441.0

Activity

  1. Masamune3210 commented on Feb 26, 2023

    @Masamune3210

    Its telling you that no applicable update is found because the installer types and scopes are not compatible with each other.

    Upgrades are only supported if the scopes match and the installers are directly compatible with each other iirc.

  2. sitiom commented on Feb 26, 2023

    @sitiom
    Author

    Upgrades are only supported if the scopes match and the installers are directly compatible with each other iirc.

    Yes, but in this case it should match. Winget is saying that the installer is in the machine scope when it really is user scope.

  3. mdanish-kh commented on Feb 26, 2023

    @mdanish-kh
    Contributor

    MSIs by default install in machine scope IIRC. To have them install in user scope, you would have to provide additional InstallerSwitches ALLUSERS=2 MSIINSTALLPERUSER=1 in the manifest.

    Ref: MSIINTALLPERSUSER Property

    You could see these switches are added to separate the two scopes in the manifest for Microsoft.RemoteDesktopClient

    But not all MSI installers (the one that comes at the top of my head is Microsoft.PowerShell) support per-user installation. So, I guess it's a matter of testing whether an MSI installer supports per-user installation, and if does you would need to add the necessary InstallerSwitches in the manifest.

  4. sitiom commented on Feb 26, 2023

    @sitiom
    Author

    The packages mentioned above are user-scoped only. See also russellbanks/Komac#103 (comment):

    That has no effect on the behavior of the installer. The install does write to that location, but the uninstall strings are still located in HKLM (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{GUID}) image

    To confirm that the issue is still present: image

  5. sitiom commented on Feb 26, 2023

    @sitiom
    Author

    Can you point to me a per-user only MSI installer that properly places the registry in the HKCU? So far the packages that I have found all install in HKLM and have the same problem.

  6. Trenly commented on Feb 26, 2023

    @Trenly
    Contributor

    Komac does a per-user install but places all of its registry entries in HKLM (which is meant for machine-wide installs) so WinGet will immediately think that Komac is a machine-wide install because of this. Komac will need to place registry entries in HKCU to be considered a per-user install to WinGet.

    Russell Banks (@russellbanks)

  7. russellbanks commented on Feb 26, 2023

    @russellbanks

    I invoke jPackager from the JDK for this, which uses Wix for exe's and msi's. I use InstallScope="perUser" Platform="x64", so I don't know whether this is Java or Wix that is putting it in the wrong place.

  8. sitiom commented on Feb 26, 2023

    @sitiom
    Author

    I use InstallScope="perUser" Platform="x64", so I don't know whether this is Java or Wix that is putting it in the wrong place.

    Or it's by design: https://stackoverflow.com/questions/32273217/how-and-why-installation-per-user-manages-to-write-to-hklm. Winget should have some sort of special detection for this one.

  9. changed the title [-]Cannot upgrade MSIs under user scope (`No applicable update found`)[/-] [+]Winget incorrectly detects per-user MSI scope (`No applicable update found`)[/+] on Feb 26, 2023
  10. sitiom commented on Feb 26, 2023

    @sitiom
    Author

    If it's a WIX bug then it's best to file an issue over at their repository to check if it's intentional or not. Developers of WIX are also in the process of rewriting its entire project (wixtoolset/wix4) which is currently in alpha so there might be a possibility that it might be fixed over there.

    Rob Mensching (@robmen) Sorry for the ping, but can we get your advice from here? Does Windows Installer really write to HKLM regardless of install scope, and what is the proper way to detect installation context from MSIs?

    Honeygain seems to be already deleted from winget-pkgs (microsoft/winget-pkgs#60711)

    Nullsoft installers can be fixed:

    The issue at hand here is about MSI installers.

    SumatraPDF seems to be already properly behaving now:
    image
    image

  11. robmen commented on Feb 27, 2023

    @robmen

    Windows Installer doesn't document its use of the registry. Use the MSI APIs, like MsiGetProductInfoExW.

  12. added
    Issue-Bug
    and removed
    Needs-Triage
    on Feb 27, 2023
  13. added this to the milestone on Jun 5, 2023
  14. removed this from the milestone on Nov 14, 2024
  15. denelon commented on Dec 30, 2024

    @denelon
    Collaborator

    WinGet is currently looking at registry entries to determine the scope of an installed package. I'll talk with the team about this bug today during our engineering sync meeting. I'm also going to go ahead and add this to the project to prioritize the work.

  16. mdanish-kh commented on Dec 30, 2024

    @mdanish-kh
    Contributor

    [Policy] Area-Scope
    [Policy] Command-Upgrade

  17. added
    Area-Scope
    Command-Upgrade
    on Dec 30, 2024
  18. removed their assignment
    on Jan 13, 2025
  19. cprivitere commented on Jul 18, 2025

    @cprivitere

    Demitrius Nelon (@denelon) you added #5099 to the 1.10 milestone, but it looks like it never made it in. Since this is the source bug 5099 is a dupe of, and I'm figuring the fact that 5099 is closed led to it getting lost after moving to newer milestones, any chance you can add this to a future milestone?

  20. annsek commented on Aug 24, 2026

    @annsek

    Are you going to finally fix it after over 3 years?

  21. hahnfk commented on Oct 28, 2026

    @hahnfk

    Additional affected package: icsharpcode.ILSpy, upgrading from 11.1.0.9782 to 11.2.0.10050.

    Environment: WinGet 1.29.380, DesktopAppInstaller 1.29.380.0, Windows 10.0.26300.9711, x64.

    winget update --all --include-unknown listed the available upgrade but did not install it. An explicit upgrade reported no applicable upgrade. The verbose log contained:

    Installer [X64,wix,User,en-US] not applicable: Installer scope does not match currently installed scope: User != Machine
    

    After uninstalling 11.1 and installing 11.2 with --scope user, the scope mismatch remains observable:

    • winget list --id icsharpcode.ILSpy --exact --scope machine finds 11.2.
    • The same command with --scope user finds no installed package.
    • Windows Installer enumeration confirms one user-unmanaged instance and zero machine instances:
    $msi = New-Object -ComObject WindowsInstaller.Installer
    $productCode = "{A12FDAB1-731B-4A98-9749-D4817EA699EE}"
    $userProducts = $msi.ProductsEx($productCode, "", 2)
    $machineProducts = $msi.ProductsEx($productCode, "", 4)
    [int]$userProducts.Count     # 1
    [int]$machineProducts.Count  # 0

    The uninstall entry is under HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A12FDAB1-731B-4A98-9749-D4817EA699EE}, while the application is installed in %LOCALAPPDATA%\Programs\ILSpy.

    The application is now up to date, but WinGet's scope classification still disagrees with Windows Installer. No manual registry changes were made.

  22. greyhair-atx commented on Oct 31, 2026

    @greyhair-atx

    Reproduced on WinGet 1.29.380, with wrong-scope replacement after uninstall

    We reproduced the per-user MSI scope mismatch with SuperPuTTY Community Edition on a disposable Windows 11 x64 guest (build 26200.9457), running WinGet 1.29.380 from a standard user's interactive session.

    Independent native MSI checks of the published 1.8.3 current-user package show:

    • MsiEnumProductsEx: exactly one user-unmanaged instance (context 2), owned by the calling user's SID; no machine-context instance (context 4).
    • MSI AssignmentType: 0.
    • Executable under %LOCALAPPDATA%\Apps\SuperPuTTY.
    • Windows Installer's ARP entry is nevertheless in HKLM's 64-bit view.
    • Direct msiexec installation gives the same result with default properties and with ALLUSERS=2 MSIINSTALLPERUSER=1.

    WinGet inventories the earlier 1.8.0 current-user MSI as ARP\Machine\X64\{7093D12F-0585-4E0C-A625-D2BB3867C54F}, despite MSI AssignmentType 0. A representative REST 1.4 catalog built from our proposed manifests correlates that installation to ChrisThornton.SuperPuTTYCommunityEdition and advertises 1.8.3. Correlation also succeeds when only 1.8.3 is exposed in catalog metadata. This is a client-side REST-source reproduction, not a claim that the package is already in Microsoft's public catalog.

    Upgrade results

    With --scope user, the upgrade finds no installed package. Without a scope filter:

    winget upgrade --id ChrisThornton.SuperPuTTYCommunityEdition --exact --source SPCEReview --silent --disable-interactivity --accept-package-agreements --accept-source-agreements --verbose-logs

    WinGet selects the all-users MSI, removes the existing current-user installation, and then requests administrator credentials. The relevant output is:

    Downloading https://github.com/greyhair-atx/superputty/releases/download/sp-1.8.3/SuperPuTTY-CE-1.8.3-all-users-win-x64-signed.msi
    Successfully verified installer hash
    Starting package uninstall...
    Successfully uninstalled
    Starting package install...
    

    We canceled the elevation prompt without supplying credentials. Installation subsequently returned MSI error 1625 (WinGet exit -1978334961); neither version remained installed. This error followed deliberate cancellation, rather than proving a separate installer policy defect. Both existing settings files retained their original SHA-256 hashes. Providing credentials and completing a machine installation was not tested.

    The reviewed candidate manifest has explicit user and machine installers and UpgradeBehavior: uninstallPrevious. The machine installer has ElevationRequirement: elevationRequired. The machine-scope control upgrade passes, including uninstall-first ordering and settings preservation.

    Public artifacts and reproduction tools

    Requested correction

    Could MSI installation context be resolved through the documented Windows Installer APIs for the current user and machine, rather than inferred solely from the ARP hive? The existing scope compatibility check should remain: relaxing it would allow an unintended change to machine installation.

    A correction should handle user-managed/unmanaged contexts, actual machine installations, duplicate/ambiguous contexts, and API errors without accidentally attributing another user's installation to the caller. It should also consider the performance cost of inventory enumeration. This is a proposed correction direction, not a tested WinGet patch.

    Acceptance cases are: user-scoped listing finds this MSI; ordinary and explicitly user-scoped upgrades select the user installer without elevation; machine upgrades remain machine-scoped; and an unresolved scope or incompatible installer is rejected before uninstalling the existing package. We can rerun the disposable-VM catalog matrix against a candidate client build.

    Our interim workaround is an explicit uninstall by the old user ProductCode without a scope filter, followed by installation of the reviewed candidate with --scope user. That migration passed scope/payload/signature/version, settings-preservation and final-uninstall checks. It is not an automatic catalog upgrade pass or a transactional recovery implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-ScopeCommand-UpgradeIssue-Bug

    Type

    Projects

    • Status
      To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions