Hi Glenn,

I have a situation where the script kept running before the executable
finished so I finished up doing the following:

Run Program %_SB_INSTALLDIR%\wmpcdcs8.exe /q:a /r:n (Always
Install) [Wait]
Set Variable %LOOPID% to "1"
Loop
Set Variable %LOOPID% to (Increment Variable by 1)
Sleep for "3" seconds
Set Variable %ACTIVE% to ScriptItem->Detect Active
Application(wmpcdcs8.exe)
If %ACTIVE% Equals "603" Then
Break Loop
End
If %LOOPID% Equals "4" Then
Break Loop
End
End

This effectively starts the program, then periodically loops to see if
the executable is still active. It also includes a fail-safe so that
it can't go into an eternal loop if something goes wrong. It closes
either after 12 seconds (4 loops x 3 second sleep) or if the
executable closes.

Best Regards,
Geoff Spillane
Data Down Under