winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

list command fails when ambiguous regkeys are present

Open degam-gh opened this issue 3 years ago • 0 comments

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

  1. 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"

  1. 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

  1. 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

degam-gh avatar Jul 01 '22 06:07 degam-gh