We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

stephanlux
Posts: 3
Joined: Fri Oct 03, 2014 12:44 pm

ProductVersion in registry key not updated when upgrading

Hello,

My install sets registry key "Version" to [ProductVersion] in the registry. This works fine.

However, when a previous version is installed and I run a major upgrade, the version in the registry is not updated and the previous version number remains. If, however, I uninstall the old version and install the new version it is working just fine.

In the log file, I do have these related lines, so the last entry says it saves 1.01.0028 to the registry.

MSI (s) (08:30) [12:23:36:366]: Executing op: RegRemoveValue(Name=VersionMinor,Value=#0,)
RemoveRegistryValues: Key: \Software\Microsoft\Windows\CurrentVersion\Uninstall\*** 1.01.0027, Name: VersionMinor
...
MSI (s) (08:30) [12:23:36:409]: Executing op: RegRemoveValue(Name=Version,Value=[ProductVersion],)
RemoveRegistryValues: Key: \Software\***\***, Name: Version
...
MSI (s) (08:A0) [12:24:14:365]: Executing op: RegAddValue(Name=Version,Value=1.01.0028,)
WriteRegistryValues: Key: \Software\***\***, Name: Version, Value: 1.01.0028


When I now look at the value with the registry editor, I still see 1.01.0027. During the install I also looked in regedit updating values as the installation goes. I could see that the "Version" key was removed (uninstall step) properly in line with the conditions for key removal I have defined. But then it is added again as 1.01.0027.

I am using installer version 11.5.

Is it possible that this version has introduced a bug here?

Thank you,
Stephan
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: ProductVersion in registry key not updated when upgradin

Hi Stephan and welcome to Advanced Installer forums,

I'm not sure why you encountered this behavior.
In order to have a better view about this, can you please send us you .aip (project) and the full log files, so we can narrow down your problem?

If you have some private information you can send them to support at advancedinstaller dot com.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
stephanlux
Posts: 3
Joined: Fri Oct 03, 2014 12:44 pm

Re: ProductVersion in registry key not updated when upgradin

Thank you Dan!

I have sent the files to your support email.

Kind regards,
Stephan
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: ProductVersion in registry key not updated when upgradin

Hi Stephan,

This is happening because you have enabled the Preserve key content option from the Operations tab.

That means the original key content (1.01.0027) will be saved and restored.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
stephanlux
Posts: 3
Joined: Fri Oct 03, 2014 12:44 pm

Re: ProductVersion in registry key not updated when upgradin

Hi Dan,

Thank you for your reply. However, this is not a solution.

Your suggestion removes ALL the key values, this is not what I looked for. I want to preserve certain values when a user uninstalls the product but remove others. That is why I added explicit key value removal rules. The idea for this is that I want to keep the path to the user product files. Then when a user uninstalls and re-installs, the software can find back the data without having to ask the user again.

My feeling is that this scenario is simply not supported.

Again, my setup works fine when explicitly uninstalling the old version and then installing the new one. But it does not work when upgrading (although the doc says that it also does an uninstall and then an install). I still see an inconsistency here.

Kind regards,
Stephan

Return to “Common Problems”