Archive: How 2 wait until Exec really ends ?


How 2 wait until Exec really ends ?
Dear all.

I try to run Uninstall.exe from MySetup.exe on .onInit
(in case there is an older ver - so I can uninstall it...)

4 some reason I could not Hide the MySetup.exe window
(maybe coz it's the same as Uninstall.exe)


Anyway, now I'm trying to hold on some loop so the user can
use Uninstall.exe and ONLY when uninstalled OR canceled
he will B able 2 continue back 2 the future (MySetup.exe)

I created a string to a temp file: "$TEMP\${strTempFileName}"


Can anyone help me produce this time machine (Guidlines | Help | Cookies) ?


It can be much, much simpler. Use ExecWait, which will wait untill the program you run has been finished (canceled, finished or crashed (if it's a Microsoft product)). When that program has finished, your program will continue it's scripts.

And b.t.w., since Uninstall.exe is a separate .exe-file, it isn't the same window as your MySetup.exe.


...
Quote:


I dont know why, but it did not work in my case (2.0b3) on a BMPHeader...

But - I just solved it with a flag file and a loopi loop

I'll post the great art work in few minutes...

Originally posted by virtlink
It can be much, much simpler. Use ExecWait, which will wait untill the program you run has been finished (canceled, finished or crashed (if it's a Microsoft product)). When that program has finished, your program will continue it's scripts.

And b.t.w., since Uninstall.exe is a separate .exe-file, it isn't the same window as your MySetup.exe.