3jg13
22nd June 2004 19:53 UTC
Uninstall before install
Hi,
In my install script, I need to check something before I install the application. I want to check and see if an older application exists. This is my first install script with NSIS for this application, so I don't think I can use any olderVersion ideas. I have found the Uninstall key in the Registry, and it will always be this key, but I don't know what to do about it. Also, what if the key isn't there? How can I do this check?
Thanks!
Joost Verburg
22nd June 2004 20:29 UTC
Use ReadRegStr to get the registry key and StrCmp to check whether it's empty or not.
3jg13
23rd June 2004 15:41 UTC
How can I run an uninstall.exe program from just a registry key?
Thanks!
Joost Verburg
23rd June 2004 16:36 UTC
Var APPFILE
ReadRegStr $APPFILE HKLM "mystr" "myvalue"
Exec $APPFILE
freeberm
24th June 2004 17:38 UTC
I attached a code snippet which I used to accomplish this. You want to set the product name variables to something suitable obviously.