list command fails when ambiguous regkeys are present
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