4 Replies Latest reply on Jan 18, 2006 7:17 AM by Josh Finkelstein

    windows wait for process to finish script

    Chris Zappala

      Does anyone have a script they use to wait for processes to finish before kicking off additional commands. This is applicable to silent installs where setup.exe kicks off another process, but we need that other process (in this case javaw.exe) to finish before we go on to the next steps.


      The problem is that setup.exe basically kicks off an install in the background, so it will immediately exit 0 causing the next commands (whether executed via NSH script, post commands, or external commands in a BLpackage) to execute.


      In this scenario, we're installing the Oracle 9i client via configuration manager. There are three steps to doing this, first installing the base, then a patch, then another patch.


      We have a vbs script that attempts to do this, but it just hangs waiting for the processes to finish so I don't have much confidence in this approach. The vbs script is attached since it may be useful to others in different scenarios.


      (the usage is WaitForExe.vbs , like WaitForExe.vbs setup.exe for instance)