microsoft / microsoft/winget-cli
Winget incorrectly detects per-user MSI scope (`No applicable update found`)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
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
- Install an old version of one of the packages above. For this example, we will use
RussellBanks.Komac. - Check available updates via
winget upgrade. Komac should show up. - Upgrade the package (
winget upgrade RussellBanks.Komac) - 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The log points to AppInstallerCLICore/Workflows/UpdateFlow.cpp and the installer-selection stage; start there and trace how an installed per-user MSI is matched to available installers. Reproduce with RussellBanks.Komac or another listed package, then verify that a compatible user-scope MSI upgrade is selected instead of reporting no applicable upgrade.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100