PDA

View Full Version : Detect Previous Version



sphair
06-22-2005, 05:35 AM
I want to detect the current installed version of my product. The command Detect Previous Version only returns the path of the product. I'm interested in [PRODUCTVER] defined in my previous installation. Is this possible to find anywhere?

linder
06-22-2005, 05:41 AM
What you can do is to read this information from the Registry. It's stored under \Uninstall\{YourGUID} - read the DisplayVersion value.

Does this help?

sphair
06-22-2005, 05:47 AM
You check this version in the WebUpdate program, and I went to see its source (quite cool, btw, that this is written IN SetupBuilder :). There I see you fetch the current version from HKLM\Software\Lindersoft\WebUpdate\Apps\GUID.

Which method do you recommend, the UNINSTALL or the WebUpdate way?

linder
06-22-2005, 05:58 AM
:)

I would suggest to use the UNINSTALL method. BTW, please check both HKLM and HKCU!

sphair
06-22-2005, 07:38 AM
I can't seem to find these Uninstall sections in the registry. What is the exact path?

sphair
06-22-2005, 07:54 AM
Found one under HKLM\Software\Microsoft\Windows\CurrentVersion\Uni nstall
, but not any under CU.

Now the next question, the main application inserts a uninstall here, and I see it has the correct version.

But after running wupdate and updating my version, this registry value still contain the old value.

linder
06-22-2005, 08:53 AM
If the Uninstall entry does not exist then you have installed all programs with Admin rights ;-)

BTW, it is your responsibility to update the version number. And to have full control, you can use your own registry key! You can add a version number, last update date, etc., etc. Use the Edit Registry and Get Registry Key Value functions.

Does this help?