microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.07k stars 1.43k forks source link

Issue with Version Detection for Discord and PostgreSQL #4257

Open Milli28718 opened 6 months ago

Milli28718 commented 6 months ago

Brief description of your issue

Hello winget-cli Team,

I am reaching out to report an issue I’ve encountered with the winget tool. Despite having the latest versions of Discord and PostgreSQL installed on my system, winget is not recognizing these versions correctly and continues to suggest that updates are available. Below are the details of the installed versions and the output from winget:

PostgreSQL is updated to version 16.2, confirmed via psql --version. Discord is updated to version Stable 273507 (17db3f8), Host 1.0.9035 x86 (44780), confirmed within the Discord application. However, when running winget upgrade, it shows that the following updates are available:

PostgreSQL from version 16.1 to 16.2 Discord from version 1.0.9030 to 1.0.9035 I have already tried winget source update and restarted my system multiple times, but the issue persists.

It appears that winget may not be updating its local package version cache after applications have been updated by other means. This might lead to persistent update notifications for the latest versions of packages that are already up to date.

Please find the attached screenshot for Discord’s version details and the command line output showing the discrepancy.

I appreciate any assistance you can provide to resolve this issue.

Best regards, Miluše Gaigerová

image issue_psql_discord.docx image

Trenly commented 6 months ago

Winget does not use a local package cache to determine versions - it uses the information the applications write into the Registry - the same information that is shown in the Add or Remove Programs screen of control panel.

In the case of Discord, it is a known issue that the discord auto-updater doesn’t update the version written in the registry. Unfortunately, this is something only the Discord creators can fix

FlyMandi commented 4 months ago

Hi, I've been plagued by this issue and admittedly was annoyed by discord still showing as available upgrade. I've written a workaround PowerShell script for this exact issue. This is for when you're sure you've got the latest version that winget suggests, but the old version does not want to update and is stuck in the registry.

I thought you might be interested, @Milli28718.

Script here & Instructions here.

This will do nothing if the registry key version is found to be up-to-date with winget's newest version. Please take this as-is, a workaround.