Archive: Prevent Multiple Installs


Prevent Multiple Installs
Hi,

I'm looking for nsis code to prevent end-users from installing more than one instance of my program.

I've trawled through the forums and help but I cant find it.

Thanks in advance


Its cool I think I've found a way:

!macro CHECK_ALREADY_INSTALLED

ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\YourProgram.exe" "Default"

${If} $R1 != ""
MessageBox MB_ICONINFORMATION|MB_OK "You have already installed YourProgram."

Quit

${EndIf}

!macroend