NETKILLER Posted February 18, 2011 Posted February 18, 2011 I am trying to install multiple bits of software using a vbscript The code I have to date is as follows Option Explicit Dim strComputer, objNetwork, wshshell Dim PCname Set objNetwork = WScript.CreateObject("WScript.Network") PCname = objNetwork.ComputerName Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "msiexec /i \\server\share\programname\setup.msi /quiet /log \\server\share\" & PCname & "\programlogfile.txt" WScript.Quit This works fine, but I want to add more programs to it, but I am very new to vbscript and I am after very simple code to get it working What I would like is between each WshShell.Run "msiexec /i \\server\share\programname\setup.msi /quiet /log \\server\share\" & PCname & "\programlogfile.txt" I have a loop test that checks is msiexec.exe process is running if yes then wait 20000 if not run next command Any ideas on a very simple solution? thank you 1
TLARWise Posted February 18, 2011 Posted February 18, 2011 if you add ',0,True' to the end of your WshShell.Run line the script will pause and wait until the program called by the line has quit before continuing on to the next line see Run Method (Windows Script Host) for more details. 1
NETKILLER Posted February 18, 2011 Author Posted February 18, 2011 hey HilcrRWise thank you that has worked 8)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now