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

`winget list` / `Get-WinGetPackage` `Name` inconsistency

Open sba923 opened this issue 2 years ago • 3 comments

Brief description of your issue

For some packages, the Name output by Get-WinGetPackage doesn't match winget list's output:

image

Steps to reproduce

Run Get-WinGetPackage on a machine with both versions 6 and 7 of the Microsoft .NET Windows Desktop Runtime.

Expected behavior

The Name property of the objects returned by Get-WinGetPackage should match the value in the Name column of winget list's output.

Actual behavior

The Name property of the objects returned by Get-WinGetPackage is not what would be expected e.g. by winget upgrade --name=xxx

Environment

Windows Package Manager v1.5.1881
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.3208
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.20.1881.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

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

sba923 avatar Aug 28 '23 10:08 sba923

[Policy] PowerShell [Policy] Command-List

Trenly avatar Aug 28 '23 13:08 Trenly

While I originally posted that using the (default?) version 0.0.1 alpha of Microsoft.WinGet.Client, the issue is still present when using version 0.2.1:

image

sba923 avatar Sep 07 '23 10:09 sba923

The Winget console displays the name shown in Add or Remove Programs (the correct one), while the Winget PowerShell script displays a name based on the ID (incorrect).

More github.com/microsoft/winget-cli/issues/5901

NewPublicUser avatar Nov 30 '25 18:11 NewPublicUser