From: JeffH on
Hi,

I have a script that runs an external program via the Shell.Run command.
The problem that I am experiencing is that the entire script finishes before
the external program completes its processing. Is there a way to call a
program from within vbscript similar to the 'call' function in DOS?

Thanks in advance,
JeffH
From: Pegasus [MVP] on


"JeffH" <JeffH(a)discussions.microsoft.com> wrote in message
news:1EA12914-91C9-4C79-8ADA-DBE8075D3252(a)microsoft.com...
> Hi,
>
> I have a script that runs an external program via the Shell.Run command.
> The problem that I am experiencing is that the entire script finishes
> before
> the external program completes its processing. Is there a way to call a
> program from within vbscript similar to the 'call' function in DOS?
>
> Thanks in advance,
> JeffH

Here is an extract from the downloadable help file script56.chm:

Run Method (Windows Script Host)

strCommand
String value indicating the command line you want to run. You must include
any parameters you want to pass to the executable file.

intWindowStyle
Optional. Integer value indicating the appearance of the program's window.
Note that not all programs make use of this information.

bWaitOnReturn
Optional. Boolean value indicating whether the script should wait for the
program to finish executing before continuing to the next statement in your
script. If set to true, script execution halts until the program finishes,
and Run returns any error code returned by the program. If set to false (the
default), the Run method returns immediately after starting the program,
automatically returning 0 (not to be interpreted as an error code).