Skip to content
⌘ NSIS Forum Archive

Execute program and wait for showing up

7 posts

Innocentus#

Execute program and wait for showing up

Dear Friends,

how can I execute an exe-File and pause the script then until the exe's program window is shown ?

Thank you very much!
With best regards
MfG
Inno
demiller9#
20 minutes and already you're begging for help??

There are a couple of solutions: the first thought is that you can have a loop with FindWindow and Sleep if it is not there yet. To FindWindow you will need the window title and should have the window class. This could fail if you're not careful if, for example, the program has another copy running, or you have another program with the same title and class (explorer window open to the folder, etc). A second solution is to wait for the process to appear (look for FindProcess in the wiki to see how to do that). Third, maybe you are simply asking how to wait for the process to appear and finish, in which case ExecWait would work.

Don
Afrow UK#
ExecWait is not the solution 🙂
pause the script until the exe's program window is shown
FindWindow in a loop is the best bet.

Stu
Innocentus#
Well, I know - it sounds rude - but could you make a primitive code example of the findwindow-loop?

Thank you very much for your help!

With best regards
MfG
Inno
Red Wine#
Check out BOTH following threads,

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.