I want to avoid my setup running more than once at the same time. I have tried to use both Findproc and kernel32 to find if my setup is already running or not. I have placed the code in my .oninit function. The problem is that when the setup is launched, it detects itself as running, and so it says me "I'm already running!" Is there a way to make it work? Thx !
or
System::Call 'kernel32::CreateMutexA(i 0, i 0, t '$(^Name)') i .r1 ?e'
Pop $R0
StrCmp $R0 0 +3
MessageBox MB_OK "The installer is already running."
Abort
FindProcDLL::FindProc "myinstall.exe"
StrCmp $R0 1 RunningInst_found RunningInst_notfound
RunningInst_found:
MessageBox MB_OK "The installer is already running."
Abort
RunningInst_notfound: