Torgeir
Thu Sep 18 11:11:53 CDT 2003
"News.Microsoft.com" wrote:
> I am trying to run the following in a script
> wshShell.run "\\server\updates$\PostSP3\MS03034\update\update.exe /z /u q"
> wshShell.run "\\server\updates$\PostSP3\MS03039\update\update.exe /z /u /q"
> however only one of the scripts runs. How do I get both of these exes to
> run before exiting the script.
Hi
You are running them in parallel. Change the script to run them in sequence
instead by setting the third parameter to True (bWaitOnReturn) and see if it
helps.
wshShell.run "\\server\updates$\PostSP3\MS03034\update\update.exe /z /u q", 1,
True
wshShell.run "\\server\updates$\PostSP3\MS03039\update\update.exe /z /u /q", 1,
True
Also, if you have a "On Error Resume Next" line in your script, remove it
(temporary) to avoid suppressing error messages from vbscript.
If this doesn't help, pick up the return code from the installs:
iRC1 = wshShell.run("\\server\updates$\PostSP3\MS03034\update\update.exe /z /u
q", 1, True)
iRC2 = wshShell.run("\\server\updates$\PostSP3\MS03039\update\update.exe /z /u
q", 1, True)
Wscript.Echo "Return code first installation: " & iRC1
Wscript.Echo "Return code second installation: " & iRC2
The values 0 and 3010 indicates an ok installation (3010 is "reboot needed").
Any other number indicates an failed installation.
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide:
http://www.microsoft.com/technet/scriptcenter