How keeping NSIS window while the application's window doesn't appear ?
Hello,

I explain you my problem, I finished my NSIS, all is good, it does all what I want etc. At the end, the nsis call the next window and gives its the focus. So it is able to find a window. My only problem is, beetween the moment that the NSIS find the window and the moment that it opens, there is sometimes, 1 or 2 seconds. Durind this time, we don't know what happen. So I would like the last NSIS's window close, when the next window appear, and not only when it finds it.

I tried the sleep function but it is not satisfying, because this time depends of the computer, the OS ..., I tried the ExecWait function but, whith the one, the NSIS window never close, and my compiler doesn't know the ExecCmd function.

Would you have a solution to this problem ?

I write you a piece of the code :

Section ...
.
.
.
nsExec::Exec 'net start "..."'
${IfNot} ${Silent}
${If} ${...}
Exec '"$INSTDIR\... .exe" /oob'
${Else}
Exec '"$INSTDIR\ ... .exe" /oob'
${EndIf}
${EndIf}
StrCpy $count 1
Looping:
FindWindow $R5 " ..." ""
StrCmp $count 6 abort
StrCmp $R5 0 0 next2
Sleep 300
IntOp $count $count + 1
Goto Looping
next2:
System::Call "user32::SetForegroundWindow($R5)"
abort:
;(I tried a 'sleep 500' here but it was not satisfying)
Quit
SectionEnd


THANK YOU FOR YOUR HELP