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

Winget reporting the wrong version for some apps

Open BennettFourr opened this issue 2 years ago • 7 comments

Brief description of your issue

Winget shows the wrong version for some apps and trys to upgrade when they are fully up to date as showen below

Steps to reproduce

Download Safing Portmaster than run "winget upgrade"

Expected behavior

It to show the correct version

Actual behavior

It shows the wrong version and trys to upgrade even when up to date Screenshot 2023-01-04 174136 Screenshot 2023-01-04 174213

Environment

Windows Package Manager v1.3.2691

Windows: Windows.Desktop v10.0.22621.963
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.18.2691.0


Safing Portmaster v1.0.4

BennettFourr avatar Jan 04 '23 22:01 BennettFourr

The version displayed by WinGet is what is displayed in Windows Apps & Features.

The "installer" is responsible for setting the registry keys for those values.

The functionality for 1.3 is described in the blog:

https://devblogs.microsoft.com/commandline/windows-package-manager-1-3/#new-version-reporting

denelon avatar Jan 04 '23 23:01 denelon

Oh, @denelon I have that problem with these VC++ redists. Is that also something wrong in the registry, or am I just doing something wrong? I have run those updates dozens of times, and they just keep coming back.

image

NoSubstitute avatar Jan 05 '23 14:01 NoSubstitute

What is that UI coming from? It doesn't look like Windows Apps & Features.

In general, we currently have challenges with many of the VC redists due to the various architectures being installed. We have work in progress to improve the situation. We have a set of heuristics that truncate architecture and other things listed in parenthesis at the end of the "displayName". We need to improve the logic for manifests with the correct "AppsAndFeatures" entries.

denelon avatar Jan 05 '23 19:01 denelon

@denelon it is the winget UI.

NoSubstitute avatar Jan 05 '23 20:01 NoSubstitute

How do you use winget ui

BennettFourr avatar Jan 05 '23 22:01 BennettFourr

Install and run. Super easy. Perhaps even available in the Store. https://github.com/marticliment/WingetUI

NoSubstitute avatar Jan 05 '23 23:01 NoSubstitute

What is that UI coming from? It doesn't look like Windows Apps & Features.

In general, we currently have challenges with many of the VC redists due to the various architectures being installed."

From my point of view winget already does a good job on c++ Redist and recognizing outdated versions.

Thankfully with 2015-2022 (named 2015+ in winget-pkgs) the side-by-side Installation of Redist has come to an end after nearly a decade.

Karl-WE avatar Jan 07 '23 01:01 Karl-WE

This also seems to happens for standalone executables?

for example:

Name                             Id                       Version        Available      Source
----------------------------------------------------------------------------------------------
Carapace                         rsteube.Carapace         0.23.0         0.24.4         winget
$ carapace -v 
> 0.24.4

This refuses to go away...

https://github.com/microsoft/winget-pkgs/blob/378cbdd2da94fe64ab662ca192639781004b122b/manifests/r/rsteube/Carapace/0.24.4/rsteube.Carapace.installer.yaml#L14

I have also several others apps that always show as outdated (because they fail to update), and while https://github.com/microsoft/winget-cli/issues/1439 is not implemented, this is very annoying

Name                             Id                       Version        Available      Source
----------------------------------------------------------------------------------------------
FACEIT                           FACEITLTD.FACEITClient   1.31.5         1.31.13        winget
EA app                           ElectronicArts.EADesktop 12.148.0.5405  12.164.0.5421  winget
Microsoft .NET SDK 6.0.203 (x64) Microsoft.DotNet.SDK.6   6.0.203        6.0.408        winget

Araxeus avatar Apr 20 '23 16:04 Araxeus

Does carapace update itself?

The version information is coming from the registry when WinGet creates the entries for portable packages. If they update themselves, there is no mechanism for WinGet to know the version needs to be updated. We might need to implement some additional special logic for portable packages with a built-in upgrade mechanism.

denelon avatar Apr 20 '23 17:04 denelon

I have the same issue with powershell. My installed version is 7.3.4, though winget shows it as 7.3.1 image

aadithya96 avatar May 04 '23 09:05 aadithya96

@aadithya96 Can you share output of winget list "PowerShell", I'm wondering if there are multiple versions installed

mdanish-kh avatar May 04 '23 09:05 mdanish-kh

@mdanish-kh You were right, there are 2 versions shown. Any idea on how to remove those? image

aadithya96 avatar May 04 '23 10:05 aadithya96

You'll have to manually uninstall the older version from Apps&Features or appwiz.cpl

mdanish-kh avatar May 04 '23 10:05 mdanish-kh

That worked.

Shouldn't winget ignore apps if they exist side by side? For example I've both SSMS 18.12 and 19.0.2 installed. But winget shows an update to 19.02 even though it's already installed.

aadithya96 avatar May 04 '23 10:05 aadithya96

There is an open issue for better handling of applications that install side by side

  • https://github.com/microsoft/winget-cli/issues/2129

Currently for packages that install side-by-side, we add an uninstallPrevious key in the manifest for WinGet to invoke the uninstaller first before initiating the installation process. In WinGet 1.5 preview release, you can use the experimental arg --uninstall-previous with winget upgrade command to get rid of the previous version first before the install process.

mdanish-kh avatar May 04 '23 15:05 mdanish-kh

Regarding the original issue, this is a problem with the Portmaster package not updating the DisplayVersion string in the registry and should be brought up to the publisher to resolve. Related issue in the portmaster repo: https://github.com/safing/portmaster/issues/1050

mdanish-kh avatar May 04 '23 15:05 mdanish-kh

I have same issue on 2024

Mrgaton avatar May 31 '24 20:05 Mrgaton