I have a computer startup script deployed by GPO that I can't get working right. The idea is to check for a log file to see if the appliation has been previously installed. If not, it'll run a cleanup utility for previous versions and proceed with the new install. I am trying to get msiexec to run without the batch window closing as Ive had instances where more than 1 msiexec instance was running and failed on the others.

The tricky thing is, using the start /wait command downright fails. I get 0 logging, it's almost as if it didnt run. However, if I remove start /wait, I am in business. Any idea how I can make this script wait until msiexec completes before closing the batch window? 

 

IF NOT EXIST "%WINDIR\Temp\FileOpenB928Log.txt" (

"\\serverpath\share\FileOpen\FileOpenUninstalTool.exe" -q

start /wait msiexec.exe /i "\\server\share\FileOpen\082013\FileOpenInstaller64.msi" /qn /l*v "%WINDIR%\Temp\FileOpenB928Log.txt

 

 

Any ideas guys? Im cracking my head open here with little luck. I've set up a policy to run scripts synchronously but msiexec itself runs async. 

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

Do you have multiple deployment scripts, each containing "START /WAIT" or one script for all deployments?

In a single VBS file, you would not need "START /WAIT"
 objShell.Run "msiexec.exe /i \\server\share\FileOpen\082013\FileOpenInstaller64.msi /qn /l*v %WINDIR%\Temp\FileOpenB928Log.txt", 1, True

If you want to prevent waiting for a task initiated with objShell.Run just change "TRUE" to "FALSE"

Check the file existence and then run that line and it will run the installs one at a time.

For multiple files "START /WAIT" will only apply to next steps in that same script, other scripts will start in a new process and will be exempt from waiting. So the system policy will need to run scripts synchronously (wait until complete) before continuing.

Answered 09/11/2013 by: Chris.Thomson@Sitel.Com
Yellow Belt

  • Chris, thanks for responding! I rebuilt everything using powershell and the 'start-process' cmdlet. I'll note this for .vbs as i've done none of it in the past. i'll take a look at the objshell.run - thanks again =D
Please log in to comment
Answer this question or Comment on this question for clarity