Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pause for one App install before running second EXE

Status
Not open for further replies.

redlair

Technical User
Jun 29, 2004
54
0
0
US

Hello, I have another simple question, which has been haunting me. I am using the WshShell.Run command in a script to install three small applications. The script works great except that all three installs are running at the same time. How can I get the script to pause and wait for the previous install to end. I know it must be something simple.

Here is an example of the script:
-----------------------------------------------------------

Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "InsatllFiles\updateX.exe"

WshShell.Run "InsatllFiles\updateY.exe"

WshShell.Run "InsatllFiles\updateZ.exe"


MsgBox("Update are complete.")
 
WshShell.Run "InsatllFiles\updateX.exe", 1, True
WshShell.Run "InsatllFiles\updateY.exe", 1, True
WshShell.Run "InsatllFiles\updateZ.exe", 1, True
MsgBox "Update are complete."

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
That will work unless the setup is wrapping another executable or MSI in which case the second process that is kicked off may still be running when the initiating process ends.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top