Skip to content

winget list --exact matches incorrectly for similar packages #3994

Open

Description

Brief description of your issue

The package Id = CodecGuide.K-LiteCodecPack.Standard version 18.0.0 installs with name "K-Lite Codec Pack 18.0.0 Standard"

But when that package is installed, winget list indicates that each of:

  • CodecGuide.K-LiteCodecPack.Full
  • CodecGuide.K-LiteCodecPack.Basic
  • CodecGuide.K-LiteCodecPack.Mega
    are installed (when they are not) and with the name "K-Lite Codec Pack 18.0.0 Standard" (which these packages do not use).

Steps to reproduce

  1. run winget install --id CodecGuide.K-LiteCodecPack.Standard
  2. run winget list --exact CodecGuide.K-LiteCodecPack.Standard
  3. run winget list --exact CodecGuide.K-LiteCodecPack.Basic
  4. run winget list --exact CodecGuide.K-LiteCodecPack.Full
  5. run winget list --exact CodecGuide.K-LiteCodecPack.Mega

Expected behavior

  1. winget list --exact 'packageID' to show information only for the exact package in question
  2. winget list --exact 'packageID' to not display name information for other packages

Actual behavior

winget list --exact show that CodecGuide.K-LiteCodecPack.Standard, CodecGuide.K-LiteCodecPack.Basic, CodecGuide.K-LiteCodecPack.Full, and CodecGuide.K-LiteCodecPack.Mega are all installed with the "Standard" name.

$ winget.exe list --exact CodecGuide.K-LiteCodecPack.Standard
Name                              Id                                  Version Source
-------------------------------------------------------------------------------------
K-Lite Codec Pack 18.0.0 Standard CodecGuide.K-LiteCodecPack.Standard 18.0.0  winget
ash:/mnt/c/Users/USER/Desktop:(Local)$ echo $?
0
$ winget.exe list --exact CodecGuide.K-LiteCodecPack.Basic

Name                              Id                               Version Source
----------------------------------------------------------------------------------
K-Lite Codec Pack 18.0.0 Standard CodecGuide.K-LiteCodecPack.Basic 18.0.0  winget
$ echo $?
0
$ winget.exe list --exact CodecGuide.K-LiteCodecPack.Full
Name                              Id                              Version Source
---------------------------------------------------------------------------------
K-Lite Codec Pack 18.0.0 Standard CodecGuide.K-LiteCodecPack.Full 18.0.0  winget
$ echo $?
0
$ winget.exe list --exact CodecGuide.K-LiteCodecPack.Mega
Name                              Id                              Version Source
---------------------------------------------------------------------------------
K-Lite Codec Pack 18.0.0 Standard CodecGuide.K-LiteCodecPack.Mega 18.0.0  winget
$ echo $?
0
$

But winget list with no arguments shows that the Basic, Full, and Mega packages are not installed:

$ winget.exe list | grep CodecGuide.K-LiteCodecPack.Standard
K-Lite Codec Pack 18.0.0 Standard        CodecGuide.K-LiteCodecPack.Standard      18.0.0                         winget
$ echo $?
0
$ winget.exe list | grep CodecGuide.K-LiteCodecPack.Basic
$ echo $?
1
$ winget.exe list | grep CodecGuide.K-LiteCodecPack.Full
$ echo $?
1
$ winget.exe list | grep CodecGuide.K-LiteCodecPack.Mega
$ echo $?
1
$

Environment

$ winget.exe --info
Windows Package Manager v1.6.3421
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.3803
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.3421.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

Activity

  1. added
    Issue-Bug
    Area-Matching
    and removed
    Needs-Triage
    on Dec 19, 2023
  2. jhribal commented on Dec 29, 2023

    @jhribal

    I found this problem too and i have to say that it is little bit funny how everywhere the need for tests is propagated and then you have this core system feature and it is probably not tested at all.
    I literally used the -e option and winget be like "meh i will do substring".
    Nobody is perfect but error like this in software like this from Microsoft? Bruh :(

  3. denelon commented on Jan 3, 2024

    @denelon
    Collaborator

    Do the other packages have a different "display Name" in Windows Apps & Features?

    This might be a case where the "installer" isn't reporting something unique for WinGet to get a distinct match. If all three report the same way in the registry, the Package ID specified is matching the manifest against what was written to the registry.

    What happens with winget list K-Lite? I'm curious which manifest is getting matched by default.

  4. added
    Needs-Author-Feedback
    on Jan 3, 2024
  5. slycordinator commented on Jan 3, 2024

    @slycordinator
    Author
    1. The display name in the Apps & Features is Unique.

    In that, I see "K-Lite Codec Pack 18.0.1 Standard"

    $ winget list K-Lite
    Name                              Id                                  Version Source
    -------------------------------------------------------------------------------------
    K-Lite Codec Pack 18.0.1 Standard CodecGuide.K-LiteCodecPack.Standard 18.0.1  winget
    
  6. added
    Needs-Attention
    and removed
    Needs-Author-Feedback
    on Jan 3, 2024
  7. removed
    Needs-Attention
    on Jan 5, 2024
  8. slycordinator commented on Apr 3, 2025

    @slycordinator
    Author

    This seems to have been fixed, at least for the K-LiteCodecPack packages.

    $ winget.exe list | grep CodecGuide.K-LiteCodecPack
    K-Lite Codec Pack 18.8.5 Full               CodecGuide.K-LiteCodecPack.Full              18.8.5                 winget
    

    As you can see, on this system I have CodecGuide.K-LiteCodecPack.Full installed.

    $ winget.exe list --exact CodecGuide.K-LiteCodecPack.Basic
    입력 조건과 일치하는 설치된 패키지를 찾을 수 없습니다.
    $ echo $?
    20
    $ winget.exe list --exact CodecGuide.K-LiteCodecPack.Standard
    입력 조건과 일치하는 설치된 패키지를 찾을 수 없습니다.
    $ echo $?
    20
    $ winget.exe list --exact CodecGuide.K-LiteCodecPack.Mega
    입력 조건과 일치하는 설치된 패키지를 찾을 수 없습니다.
    $ echo $?
    20
    $ winget.exe list --exact CodecGuide.K-LiteCodecPack.Full
    이름                          장치 ID                         버전   원본
    ----------------------------------------------------------------------------
    K-Lite Codec Pack 18.8.5 Full CodecGuide.K-LiteCodecPack.Full 18.8.5 winget
    $ echo $?
    0
    

    In the above output "입력 조건과 일치하는 설치된 패키지를 찾을 수 없습니다." means "No installed packages were found that match the input conditions." and for each of the non-installed packages, it set the exitcode to 20.

    And the final command shows the data for the information for the one which is actually installed, as it should with a success (0) exitcode.

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-MatchingIssue-Bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions