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

[BUG] Winget unable to identify current version, and delayed updates #104

Closed
Sollaze opened this issue Oct 24, 2023 · 7 comments
Closed
Labels
bug Something isn't working triage Marks issues that were created with an issue template

Comments

@Sollaze
Copy link

Sollaze commented Oct 24, 2023

Version

6.3.0 and below

Windows Version

Windows 10 Pro 22H2

Actual Behaviour

As you can see in the screenshot below, winget is unable to identify the current version of the application and is also behind on the release versions (at least for some time).
image

Expected Behaviour

Ideally, winget should be able to determine the current application version but it would also be great if it could detect (or deliver) updates as fast as the app's built-in update checker.

Reproduction Steps

No response

Log

No response

@Sollaze Sollaze added bug Something isn't working triage Marks issues that were created with an issue template labels Oct 24, 2023
@radj307
Copy link
Owner

radj307 commented Oct 28, 2023

@radj307
Copy link
Owner

radj307 commented Oct 28, 2023

I have identified the problem. Winget gets the current version number from the program's Uninstall key in the Registry, by checking for a property named DisplayVersion.

Volume Control's installer does not currently set this value.

The Inno setup script should be modified to set the DisplayVersion property to the installed version number, which should fix the problem.

radj307 added a commit that referenced this issue Oct 28, 2023
- removed VersionInfoVersion to fix non-binary version numbers causing errors
- implemented a fix for #104
@radj307
Copy link
Owner

radj307 commented Oct 28, 2023

Implemented a fix in d032056

Despite Inno Setup providing a few different parameters to set various values in the application uninstall key, AFAIK it does not provide a way to set the DisplayVersion value. It does, however, provide a way to set registry keys/values in general.
Since Volume Control can be installed for all users or only the current user, its registry key can be in two different places:
HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall (All Users)
HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall (Current User)

Adding PrivilegesRequired=lowest to [Setup] will install the application without admin permissions when installing for the current user. Now we can check IsAdmin to determine the installation scope, and conditionally install the registry value to the appropriate location:

[Registry]
; All Users
Root: HKLM; Subkey: "Software\Microsoft\Windows\CurrentVersion\Uninstall\{{#AppID}_is1"; ValueType: string; ValueName: "DisplayVersion"; ValueData: "{#AppVersion}"; Flags: uninsdeletevalue; Check: IsAdmin
; Current User
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Uninstall\{{#AppID}_is1"; ValueType: string; ValueName: "DisplayVersion"; ValueData: "{#AppVersion}"; Flags: uninsdeletevalue; Check: not IsAdmin

We'll find out whether this worked or not in the next release.

@radj307
Copy link
Owner

radj307 commented Oct 28, 2023

Due to the way that winget is set up, it just isn't possible to make new versions available very quickly.

Volume control's built-in update checker works by comparing the version number of the latest release on github to the current version. So as soon as a new release is created, volume control's update checker can see it. In order for new releases to make it to winget, a release has to be posted to github, which then triggers the workflow to create a pull request in the winget-pkgs repository. The pull request has to be reviewed by a community moderator, which can take some time.

@radj307
Copy link
Owner

radj307 commented Oct 29, 2023

The changes in d032056 did not fix the problem. The DisplayVersion registry key is created successfully, but Inno Setup immediately overrides it because it creates the uninstall key after anything set in the [Registry] section.

Related:

@radj307
Copy link
Owner

radj307 commented Oct 29, 2023

Fixed in fb0992a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Marks issues that were created with an issue template
Projects
None yet
Development

No branches or pull requests

2 participants