microsoft / microsoft/winget-cli
list command fails when ambiguous regkeys are present
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
When additional regkeys that resemble the package id (and possibly other matching properties?) are present in the uninstall registry hive, the list command is unable to find the affected package.
Steps to reproduce
- Import the following regkey:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Test_Key_7Zip]
"DisplayName"="7Zip"
"DisplayVersion"="1.0"
"InstallDate"="20200101"
"Publisher"="IgorPavlov"
- Install the 7zip winget package:
winget.exe install --id 7zip.7zip -s winget -e --accept-source-agreements --accept-package-agreements -h --scope=Machine --verbose-logs
- Try listing the package:
winget.exe list --id 7zip.7zip -s winget -e --accept-source-agreements
Expected behavior
Name Id Version
-----------------------------------
7-Zip 22.00 (x64) 7zip.7zip 22.00
Actual behavior
No installed package found matching input criteria.
Environment
Tested on stable (Windows Store AppInstaller version) and latest github pre-release (1.3.1741)
Windows: Windows.Desktop v10.0.19044.1766
System Architecture: X64
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
Start by importing the supplied Test_Key_7Zip registry key, installing 7-Zip, and reproducing the winget list command with the exact package ID. Trace the uninstall-registry matching path responsible for resolving the package, then verify that the command returns 7-Zip 22.00 while the ambiguous key is present.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100