Archive: how to stop installer exe to run if one installtion has already being done


how to stop installer exe to run if one installtion has already being done
I created one Installer exe(setup.exe) using NSIS and then

i installed it ,Once it is being installed if i install it

again it creates one more instance .How can i avoid this

i looked in the NSIS help there i got the solution for

avoiding the multiple instances that is working fine .It

does not allows to run multiple installer exe to run at

same time but my problem is my problem once being installed

and if some body double click the setup.exe it installs it

again .How to avoid this


!define InstallDirRegKey 'HKLM "Software\MyApp" InstallDir'
InstallDirRegKey ${InstallDirRegKey}

Function .onInit
ClearErrors
ReadRegStr $R0 ${InstallDirRegKey}
IfErrors +3
MessageBox MB_OK|MB_ICONSTOP "MyApp is already installed."
Abort
FunctionEnd

Section -InstallDirRegKey
WriteRegStr ${InstallDirRegKey} $INSTDIR
SectionEnd


Stu

Re: how to stop installer exe to run if one installtion has already being done
Hi Afrow

Thanks a lot