windows - Detecting if a program is already installed with NSIS -


What is the best way to find out what I am using NSIS to create an installer for a program Is this program already installed? Also, since I'm running the installer from autorun.inf, can I opt out immediately from the installer if it underlines an installed copy? Is there a better way to do this?

How about this? I have an old NSIS script which was around laying.

 ; Check to see if you already readRegStr $ R0 HKLM "Software \ Microsoft \ Windows CurrentVersion \ Uninstall \"  "UninstallString" ifFile $ R0 +1 Not Found Message Box: Show MB_DEFBUTTON4 | MB_TOPMOST "& lt; Your-APP-NAME & gt; "\" 0103 "\" & lt; Your-APP-NAME & gt; Has already been installed. "" Uninstall Launch "" Cancel "Pop $ R1 Strank $ R1 Remove 2 +1 Skip Exit $ R0: Do not Sign Out:  

Comments