Archive: How to restore minimized 1st instance


How to restore minimized 1st instance
To allow only 1 copy of my installer I use mutex, and it works good.
Then, before aborting 2nd copy of installer I would like to restore minimized window of the 1st copy. It's window has been found, but it can't be restoring from minimized state. ShowWindow doesn't work. Why?
----------------------------------------------------
Function .onInit
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "Checker8InstallProcess") i .r1 ?e'
Pop $R0

${if} $R0 != 0
MessageBox MB_OK|MB_ICONEXCLAMATION "Already running!"
FindWindow $0 "#32770" "${CaptionString}"
IsWindow $0 0 +4
MessageBox MB_OK "found a window"
ShowWindow $R0 ${SW_RESTORE} ; this doesn't work...
Goto +2
MessageBox MB_OK "no window found"
Abort
${EndIf}
FunctionEnd
------------------------------------------------------


Why are you using $R0 in ShowWindow? Should it not be $0.

-Stu


Thanx, LOTTA thanx!
I didn't catch this fault. Of cource it should be $0!
Now it works! Thank you again! NSIS forum is the great power!!!