Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'winget upgrade' reports WinDirStat upgradable when latest version is installed #88994

Closed
Hobart opened this issue Feb 15, 2022 · 17 comments
Closed
Labels
Area-External Help-Wanted This is a good candidate work item from the community. Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@Hobart
Copy link

Hobart commented Feb 15, 2022

Brief description of your issue

I have WinDirStat 1.1.2 installed. winget upgrade lists it as upgradable.

Steps to reproduce

C:\Windows\system32>winget upgrade
Name                Id                    Version Available Source
------------------------------------------------------------------
Mozilla Firefox ESR Mozilla.Firefox.ESR   45.9.0  91.6.0    winget
WinDirStat          WinDirStat.WinDirStat Unknown 1.1.2     winget
2 upgrades available.

C:\Windows\system32>

Expected behavior

Not see an up to date product listed.

Actual behavior

Product is listed with installed 'Version' of 'Unknown'

Environment

C:\Windows\system32>winget --info
Windows Package Manager v1.1.13405
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.1526
Package: Microsoft.DesktopAppInstaller v1.16.13405.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

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
reg query hkcu\software\microsoft\windows\currentversion\uninstall\windirstat

HKEY_CURRENT_USER\software\microsoft\windows\currentversion\uninstall\windirstat
    UninstallString    REG_EXPAND_SZ    "C:\Program Files (x86)\WinDirStat\Uninstall.exe"
    InstallLocation    REG_EXPAND_SZ    C:\Program Files (x86)\WinDirStat
    DisplayName    REG_SZ    WinDirStat 1.1.2
    DisplayIcon    REG_SZ    C:\Program Files (x86)\WinDirStat\windirstat.exe,0
    dwVersionMajor    REG_DWORD    0x1
    dwVersionMinor    REG_DWORD    0x1
    dwVersionRev    REG_DWORD    0x2
    dwVersionBuild    REG_DWORD    0x4f
    URLInfoAbout    REG_SZ    http://windirstat.info/
    NoModify    REG_DWORD    0x1
    NoRepair    REG_DWORD    0x1
@ghost ghost added the Needs-Triage This work item needs to be triaged by a member of the core team. label Feb 15, 2022
@denelon
Copy link
Contributor

denelon commented Feb 15, 2022

The latest version of WinDirStat (1.1.2) does not get reported to Apps & Features. Without that information we are not able to determine if the latest version in the community repository is an upgrade or not.

The latest version of the Windows Package Manager does a better job of handling this scenario in the UI until the publisher begins reporting the version installed.

Below I've installed the package and run the upgrade command. It displays the package with a version that cannot be determined.

Then I've run the upgrade command with the "--include-unknown" argument. It then includes WinDirStat in the output with the "Unknown" version that is currently installed.

PS C:\Windows\system32> winget install WinDirStat
Found WinDirStat [WinDirStat.WinDirStat] Version 1.1.2
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://sourceforge.net/projects/windirstat/files/windirstat/1.1.2%20installer%20re-release%20%28more%20languages%21%29/windirstat1_1_2_setup.exe/download
  ██████████████████████████████   630 KB /  630 KB
Successfully verified installer hash
Starting package install...
Successfully installed
PS C:\Windows\system32> winget upgrade
Name           Id              Version     Available    Source
--------------------------------------------------------------
Microsoft Edge Microsoft.Edge  92.0.902.67 98.0.1108.50 winget
calibre        calibre.calibre 4.16.0      5.36.0       winget
2 upgrades available.
1 package has a version number that cannot be determined. Use "--include-unknown" to see all results.
PS C:\Windows\system32> winget upgrade --include-unknown
Name           Id                    Version     Available    Source
--------------------------------------------------------------------
Microsoft Edge Microsoft.Edge        92.0.902.67 98.0.1108.50 winget
WinDirStat     WinDirStat.WinDirStat Unknown     1.1.2        winget
calibre        calibre.calibre       4.16.0      5.36.0       winget
3 upgrades available.
PS C:\Windows\system32>

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-External and removed Needs-Triage This work item needs to be triaged by a member of the core team. labels Feb 15, 2022
@denelon denelon transferred this issue from microsoft/winget-cli Nov 17, 2022
@ghost ghost added the Needs-Triage This work item needs to be triaged by a member of the core team. label Nov 17, 2022
@denelon denelon added Help-Wanted This is a good candidate work item from the community. and removed Needs-Triage This work item needs to be triaged by a member of the core team. labels Nov 17, 2022
@ShockwaveNN
Copy link

ShockwaveNN commented Nov 17, 2022

I found WinDirStat issue tracker and reported problem with versioning

No sure how developers are active, but this is all I can do )

@Bertaz
Copy link

Bertaz commented Feb 13, 2023

More active repo windirstat/windirstat#2

@krystofkrticka
Copy link
Contributor

krystofkrticka commented Jul 6, 2023

This might be fixed by this microsoft/winget-cli#3134 if it's implemented in winget. Because windirstat has version number in metadata of executable. So for some packages having option to say winget to look into metadata of executable would be able to fix a lot of similar issues to this.

@db2222
Copy link

db2222 commented Sep 2, 2023

In case anybody wants to correct it manually until a general fix is available do the following:

  • Open RegEdit.
  • Go to Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinDirStat.
  • Add DisplayVersion and set the value to 1.1.2.

@ShockwaveNN
Copy link

@db2222

Thanks for workaround, but seems didn't worked for me:

image

Any advice? Mabye DisplayVersion should be specific type, not REG_SZ

@db2222
Copy link

db2222 commented Sep 12, 2023

@ShockwaveNN I have a suspicion. In the Registry it is set for HKEY_CURRENT_USER. Your PowerShell window is running as Administrator. Maybe those are 2 different users?

Or maybe you also need to restart the command line window or login in windows again as it maybe is cached. I cannot remember exactly if this was necessary.

Edit: REG_SZ is correct.

@ShockwaveNN
Copy link

Your PowerShell window is running as Administrator. Maybe those are 2 different users?

Yeah, you right

But seems like

  1. winget can be only run from administrator
  2. I've tried to find those keys for any other users - and seems they not exists

So probably workaround works only if user you've installed the WinDirStat is Administrator

@db2222
Copy link

db2222 commented Sep 12, 2023

For me winget also works in a "normal" (none-admin) PowerShell window.
I can confirm that WinDirStat is installed as admin. The setup itself demands it.

Just as an idea. Does it work in case you set Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinDirStat in the registry? You most likely have to create it. Furthermore I'm unsure what happens if you have a mixture between LOCAL_MACHINE and HKEY_CURRENT_USER. So maybe you have to remove the folder in USER and only create under LOCAL_MACHINE (make a backup before 😉). Also restart the computer to be sure that it is recognized.

@3xploiton3
Copy link

image

Copy link
Contributor

Hello @Hobart,

This issue has been identified as requiring a fix from a third party or external repository. Since there has been no recent activity on this issue, it will be automatically closed.

Template: msftbot/noRecentActivity/areaExternal

@JoKalliauer
Copy link

JoKalliauer commented Apr 11, 2024

@ShockwaveNN

Thanks for workaround, but seems didn't worked for me:
image

Any advice? Mabye DisplayVersion should be specific type, not REG_SZ

Maybe you have a trailing space at the end (DisplayVersion instead of DisplayVersion) ?
grafik

To avoid copying-mistakes run the following command:
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\WinDirStat" /v "DisplayVersion" /d 1.1.2 /t REG_SZ /f

or try importing the following registry:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\WinDirStat]
"DisplayVersion"="1.1.2"

General advice:
Before running any code, or adding anything to the registry, allways make a quick check if the code might be malicious.

@ShockwaveNN
Copy link

@JoKalliauer Thanks, actually you're right, there was a space at the end of reg key

Thanks for help, seems everything is all right when I've applied your registry command

@JaneX8
Copy link

JaneX8 commented Apr 20, 2024

This is seriously annoying. As per above suggestion, I used this Powershell command (as admin) directly after installing WinDirStat using winget. I run as administrator, but it checks for other users too, to also work if it was previously installed otherwise. Also, it only works for 1.1.2 (based on the DisplayName).

winget install --scope machine --accept-source-agreements -e --id WinDirStat.WinDirStat
Get-ChildItem Registry::HKEY_USERS\ -ErrorAction SilentlyContinue | Where-Object { $_.Name -match 'S-1-5-21-' } | ForEach-Object { $path = "Registry::HKEY_USERS\$($_.Name -replace 'HKEY_USERS\\', '')\Software\Microsoft\Windows\CurrentVersion\Uninstall\WinDirStat"; if ((Test-Path $path) -and ((Get-ItemProperty -Path $path -Name "DisplayName" -ErrorAction SilentlyContinue).DisplayName -like "*1.1.2*")) { Set-ItemProperty -Path $path -Name "DisplayVersion" -Value "1.1.2" -Force } }

@Lonniebiz
Copy link

Lonniebiz commented Sep 19, 2024

Why is this issue closed, given that it is still unresolved?

@JoKalliauer
Copy link

Why is this issues closed, given that it is still unresolved?

Please read ALL previous comments word-by-word before commenting, including the one which closed this issue.

Afaik it is a WinDirStat-Bug, see #88994#issuecomment-1428391559, I think it is already fixed (since Dec 2023) in the current source code for WinDirStat.
WinDirStat 1.1.2 was released in 2005, and re-released in 2007, so you have to wait for the next verison (1.1.3 or 1.2.0 or 2.0.0 or similar) or in case you are not patient you can compile the WinDirStat-source-code yourself.

If you expect a Workaround by WinGet, be more specific, as e.g. another previous comment.

I recommend fixing it for WinDirStat 1.1.2 locally according to another previous comment.

@Lonniebiz
Copy link

Lonniebiz commented Sep 20, 2024

I'm not a fan of bots auto-closing unresolved issues. Ninite doesn't seem to have this problem of installing the same version of windirstat over and over again . Apparently, their developers took responsibility that their updater should at least be smart enough to recognize the version (it just installed) without depending solely on some arbitrary value in the windows registry.

If winget installs an application it should take note of the version it installed (somewhere) especially if this windows registry entry doesn't exist. (Perhaps winget should make that entry in the Windows Registry if it is otherwise not there after an installation/update). Since all installations and updates are timestamped, winget can assume that the current version of an application is the same version it previously installed as long as the timestamps match (between what winget recalls installing itself and the installation time of the currently installed application). Only when those timestamps do not match should winget consider upgrading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-External Help-Wanted This is a good candidate work item from the community. Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

10 participants