Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 6th December 2006, 16:01   #1
mayPol
Junior Member
 
Join Date: Jul 2006
Posts: 23
How to run a single setup when clicking on the setup exe file few times

Hi,

I created a setup file, called mySetup.exe.

When clicking on this setup, the setup dialog opens. If clicking again on the setup, another dialog opens. How can I make that only one setup will run in a current moment ?

Thanks,
May
mayPol is offline   Reply With Quote
Old 6th December 2006, 16:23   #2
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
Function .onInit

;Allow only one installer instance
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "5C00D2E5-758B-4F49-A0BB-03E596E0B470") i .r1 ?e'
Pop $R0
StrCmp $R0 0 DoRunInstall
Abort
DoRunInstall:

...

"Just do it"
onad is offline   Reply With Quote
Old 6th December 2006, 16:28   #3
mayPol
Junior Member
 
Join Date: Jul 2006
Posts: 23
Thanks!!!
mayPol is offline   Reply With Quote
Old 6th December 2006, 16:32   #4
onad
Senior Member
 
onad's Avatar
 
Join Date: Dec 2004
Location: Turkey
Posts: 447
NOTE:
I've created the GUID in the example for you, so I know it is quite unique and will not criple other installers...

"Just do it"
onad 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