Archive: ExecWait with a BitRock uninstaller


ExecWait with a BitRock uninstaller
Hi,

I've read several posts on these forums about the ExecWait instruction in the "Uninstall" section. Unfortunately, the uninstall.exe I try to launch with ExecWait is not on this list :

http://unattended.sourceforge.net/installers.php

As you may have guessed, in my "Uninstall" section, I try to run an uninstaller made with BitRock :

ExecWait '"$INSTDIR\uninstall.exe" --mode unattended'

The "--mode unattended" makes the uninstaller not prompting a "Yes/No" question, and pops several DOS consoles in the background that do their jobs.

However, ExecWait does not wait, the next instructions are being executed while the DOS consoles do their jobs too.

What could I do ?

Thank you,


ExecWait ALWAYS waits for its child process.


Unfortunately if ExecWait doesn't appear to actually wait, it's usually because the program you launched, launched another process itself. This applies to NSIS as well; http://nsis.sourceforge.net/When_I_u...he_uninstaller

As you can see from that page.. NSIS has an option in place to disable this mechanism. I skipped the BitRock FAQ, but didn't see anything similar in there.. but you could have a look around or ask the developers.

If there isn't a built-in option, and the actual author didn't include an option either, you're usually left with rather hacky solutions. E.g. if you know what process it spawns, you could try checking for that process and only continue once that process is gone... or if you know the uninstaller removes a certain file last (having determined this by running the uninstaller and watching what it does with e.g. Process Monitor), then your uninstaller could check whether that file has been removed and only continue once it has been.


thanks for your answers.

Unfortunately, it seems i'm obliged to use hacky solutions. I do think i'm going to use the "CheckIfFileIsDeleted" one.

However... how can I tell my script to stop and to continue only once a certain file/directory is deleted ? I did not manage to find this info.

Thank you,


${DoWhile} ${FileExists} [path]
Sleep 1000
${Loop}
Or:
${For} $R0 1 60
Sleep 1000
${IfNot} ${FileExists} [path]
${Break}
${EndIf}
${Next}
${If} $R0 == 61
; oops, timeout
${EndIf}
Stu

Thank you Stu