Compare previous version and new installation verion

Got a problem you cannot solve? Try here.
tbushell
Posts: 3
Joined: Fri Oct 07, 2011 3:25 pm

Compare previous version and new installation verion

Postby tbushell » Tue Mar 04, 2014 10:40 am

Hi, Guys

I am currently working on a project of modifying the installer. The idea is to check the previously installed version, then compare with the new installation version. If it's a major upgrade, then show user it's a major upgrade, blah blah blah...
I am using the Get File Version command to get the older version from user selected path. But the issue I had is during the installation, in the step progressprereq, it detects NEEDSUPGRADE, and then it remove all the files in the target folder. So I always get file version 0.0.0.0

Is there a way to get the installed version without requesting user selecting the path of installation folder. Or is there a way to get installed version directly?
Thanks for your time.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Compare previous version and new installation verion

Postby FrancescoT » Tue Mar 04, 2014 1:00 pm

Dear User,

I am not quite sure to follow correctly which is your effective target, anyway you could read the target system registry to acquire the installed app version.

This is data is stored with the values; "DisplayVersion" or "VersionMajor" and "VersionMinor" under the registry path;

- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\<PRODUCTCODE>

on x64 OS platforms, if the installed product is a native 32 bit application, those values are stored under;

- HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\<PRODUCTCODE>

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

tbushell
Posts: 3
Joined: Fri Oct 07, 2011 3:25 pm

Re: Compare previous version and new installation verion

Postby tbushell » Tue Mar 11, 2014 11:51 am

Thanks Francesco. All I want to do is compare previous version number with the new version number. If the new version number higher than the previous installed one, I will warn the user with certain information.
And your solution solve the problem. Thank you very much.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Compare previous version and new installation verion

Postby FrancescoT » Tue Mar 11, 2014 1:34 pm

:D
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 96 guests