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

Incorrect ProductVersion property for Uninstall Registry Key #355

Open
rakleed opened this issue Nov 8, 2023 · 7 comments
Open

Incorrect ProductVersion property for Uninstall Registry Key #355

rakleed opened this issue Nov 8, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@rakleed
Copy link

rakleed commented Nov 8, 2023

Describe the bug
The ProductVersion property for Uninstall Registry Key is version 4.

To Reproduce
Steps to reproduce the behavior:

  1. Install latest version of TcNo Account Switcher
  2. Open Windows 11 Settings
  3. Go to Apps, then Installed Apps
  4. Find TcNo Account Switcher in the list

Expected behavior
The ProductVersion property for Uninstall Registry Key indicates the current version 5.0 - 2023-07-05_00.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 11 23H2
  • TcNo Account Switcher: v5.0 - 2023-07-05_00

Additional context

@rakleed rakleed added the bug Something isn't working label Nov 8, 2023
@Eddga
Copy link

Eddga commented Nov 12, 2023

+1
But: @rakleed in any case you commited the wrong version number in the installer yaml here: microsoft/winget-pkgs#125068
I'm using Winget-AutoUpdate and it updated today as soon as it found the app in winget and thought that 2023-07-05_00 was bigger than 4 (which is true, but... yeah) even though I already was at that version. And now my complete TcNo config is gone for some reason. Not cool.

As long as this issue here isn't resolved the version in winget has to be 4 like it is when installed - even when this means that it breaks winget update functionality. Otherwise this always shows as an update being available for that particular app.
I already created another PR to have that fixed.

@TCNOco As soon as this is fixed and for future versions you might consider using winget for updating the app and also could have your newest version automatically uploaded to the winget-pkgs repo. This could also help get some users updated from older versions like you mentioned here.

@TCNOco
Copy link
Owner

TCNOco commented Aug 25, 2024

Thanks for this. Thought I would need to rewrite the installer to work with winget.
If I use !define VERSION "2024-08-25_00" as I do with the normal version number, would winget be happy? or does it need a more standard version number?

!define VERSION "4.0.0.0"

Think I'd add a script to update the version number in all the required places if this is possible... Otherwise it comes down to just remembering it :/

@Eddga
Copy link

Eddga commented Aug 25, 2024

Hey @TCNOco !
Happy to hear from you. 🙂
I think that 2024-08-25_00 should work as the version number for WinGet.
Other vendors are using dates as version basis, too and they seem to be working with winget - see e.g. https://github.com/microsoft/winget-pkgs/tree/master/manifests/j/JetBrains/IntelliJIDEA/Ultimate
How ever they use dots instead of hyphens as date separators and therefore are practically adhering to semantic versioning like Major.Minor.Patch format. So I'd probably suggest 2024.08.25.00 - however like I said it I'm pretty sure it would work with hyphens as well. Also see here microsoft/winget-cli#2840 is a discussion/open issue about date format however the vendor is using regional format DDMMYYYY which obviously isn't logical to Winget. But here you can read from WinGet contributor denelon who is simply suggesting to use semantic versioning but not saying hyphens wouldn't work.
Just found a few more more examples of apps using standardized date format with hyphens for versioning and are listed in winget:
https://github.com/microsoft/winget-pkgs/tree/master/manifests/o/odin-lang/Odin
https://github.com/microsoft/winget-pkgs/tree/master/manifests/t/TravisGoodspeed/MaskROMTool
https://github.com/microsoft/winget-pkgs/tree/master/manifests/t/Tohrusky/Final2x

I tried to find the code snippet of how winget-cli compares app versions when updating but I'm not a developer and don't know which files I'd need to inspect for that.

Best,
Eddga

TCNOco added a commit that referenced this issue Aug 25, 2024
For #355. Changes file versions for all .exes, installers, etc.
TCNOco added a commit that referenced this issue Aug 25, 2024
For #355. Changes file versions for all .exes, installers, etc.
TCNOco added a commit that referenced this issue Aug 25, 2024
If the program is updated via the updater, instead of the installer, the uninstaller and Windows should show the correct versions. #355
@TCNOco
Copy link
Owner

TCNOco commented Aug 26, 2024

Fixed with the latest release - Ready for download!
Closing this issue as resolved. Thanks for the input.
If there are any issues, let me know on Discord, or through a new issue.

This should fix any issues with WinGet and the rest. Re-open or otherwise if there are any other issues from this.
I'll have a look when I have time to see if I can push to WinGet as well. I assume I just open a PR there as well

@TCNOco TCNOco closed this as completed Aug 26, 2024
@Eddga
Copy link

Eddga commented Aug 26, 2024

Thanks for your work @TCNOco - I just tested it.
Maybe that's to late now and maybe nobody but me will notice - however I suggest to keep version naming consistent throughout Github and the installer. You used semantic versioning with dots now for the uninstall string however you used the version name with hyphens everywhere else (release notes, file names, ...) which could be confusing. So if you want to stick with hyphens everywhere else I'd suggest also use them in the Windows uninstall string/VERSION.
Regarding WinGet PR - I got you covered: microsoft/winget-pkgs#169339
I use wingetcreate (pre-installed on W10/11 if I'm not mistaken) and a local copy/fork of the winget-pkgs repo to update manifests and submit them via PR. Others like YamlCreate better. I remember something like being able to skip reviewing of the PR if you identify as developer of said app. However currently I can't find any information on anything close to that. So my brain might have made that up at some point. 😅 And honestly it doesn't matter all that much as they're pretty fast with reviewing last time I checked.

@TCNOco
Copy link
Owner

TCNOco commented Aug 26, 2024

Thanks for the info.
I've used dots where it seems appropriate.
The installer for example seems a little upset with the numbers. I've had to use commas as that's how this file is set out. I don't think underscores and hyphens would work here... But for FileVersion and ProductVersion as strings it should be okay to use the "normal" version number.

I haven't played around with it much but I'll return in the future with more info, hopefully.

image

@TCNOco TCNOco reopened this Aug 26, 2024
TCNOco added a commit that referenced this issue Aug 27, 2024
- Added Cookies back to Platforms.json for Riot Games. May fix #390
- Using more consistent version naming where possible, #355
@TCNOco
Copy link
Owner

TCNOco commented Aug 27, 2024

In a future push I'm making as many things as possible match my usual naming scheme... However...
image

The installer, of all things does not like the naming format. Unfortunately, it will have to remain as dots. I can however change the "Display version"

On a funny side note it does seem that struggling with version naming for Windows and installers is a... universal issue...
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants