Re: Run an .exe file and wait for it to finish by Tom
Tom
Fri Feb 01 10:59:30 CST 2008
On Feb 1, 9:14 am, "Ebbe"
<REMOVE.CAPS.eKJFsRDX...@HGFgUYTiYFCtBGRsG.JGdJFGkGF> wrote:
> Hi!
>
> I want to run path\prog.exe and wait to contunie with next statement in my
> .vbs-file until after prog.exe has finished.
> Right now the vb-script continue execution as soon as prog.exe is invoked.
> Is there a way?
>
> Ebbe
Most programs executed via the Wscript.Shells Run method, just require
the addition of a control switch to do this. Some install programs
launch other threads that circumvent this control. Since you don't
say anything about how you're running the program or what type of
program it is, I would suggest you start with adding the bWaitOnReturn
parameter to the Run statement ...
object.Run strCommand, [intWindowStyle], [bWaitOnReturn]
e.g. ...
oWSH.Run prog.exe,0, True
Tom Lavedas
===========