0
votes

Well my installer installs some 3rd party msi installer silently. Now currently I'm checking the existing version by registry read method of Uninstall key (SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{GUID}). But this leads to some problem like each time the company giving me a new updated installer, I need to change this GUID.

And yes, I cannot rely on the 3rd party company's installer upgrade method as sometimes their msi gets screwed up, so need to check for the upgrade scope manually.

Now one way to overcome this, reading the version number of that 3rd party installed files and take decision accordingly.

Is there any other way that anyone can point me?

1
Could you check the exit code of msiexec.exe? - Anders
The question is checking existing version of 3rd party software existence on the target system. Whats the point of checking msiexec return type? - hypheni
I thought you installed the .msi and then checked, sorry... - Anders

1 Answers

0
votes

NSIS has a function GetFileVersion that may help you. Just pass it one of the executable files from the third party files. Here is my example:

${GetFileVersion} "$UserDir\thirdParty.exe" $CurrentVersionString
StrCpy $CurrentVersion $CurrentVersionString
DetailPrint "The Current version is: $CurrentVersion"

This will work provided the third party software properly versions their executables.