Talk:Allow only one installer instance
From NSIS Wiki
Jump to navigationJump to search
User:Saivert You can also put the value of $HWNDPARENT variable in a registry key and then use this in a second invocation of the installer to bring the original installer window to front. Like in this example:
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "myMutex") i .r1 ?e' Pop $R0 StrCmp $R0 0 goahead MessageBox MB_OK "The installer is already running." ReadRegStr $R0 HKLM "Software\MyApp" "installerhwnd" System::Call 'user32::SetForegroundWindow(i R0) i ..' Abort goahead: WriteRegStr HKLM "Software\MyApp" "installerhwnd" $HWNDPARENT
Hope this helps further....
Forum thread for this article
http://forums.winamp.com/showthread.php?t=362157
Slappy 04:40, 27 May 2013 (UTC)