Single installer instance
Hi,
Can anybody tell me how to restrict launch of installer if one instance is already running.
Thanks in advance.
Alok
Archive: Single installer instance
Single installer instance
Hi,
Can anybody tell me how to restrict launch of installer if one instance is already running.
Thanks in advance.
Alok
Got it.
Put the following code in your .onInit function:
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e'
Pop $R0
StrCmp $R0 0 +3
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
Abort
'myMutex' should be replaced by a unique value.
Search and the Wiki are your friend! :)