Old 14th September 2006, 09:33   #1
aloknarula
Junior Member
 
Join Date: Sep 2006
Posts: 2
Single installer instance

Hi,

Can anybody tell me how to restrict launch of installer if one instance is already running.

Thanks in advance.
Alok
aloknarula is offline   Reply With Quote
Old 14th September 2006, 09:43   #2
aloknarula
Junior Member
 
Join Date: Sep 2006
Posts: 2
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.
aloknarula is offline   Reply With Quote
Old 14th September 2006, 15:50   #3
CrushBug
Senior Member
 
Join Date: May 2005
Posts: 119
Search and the Wiki are your friend!
CrushBug is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump