/build/static/layout/Breadcrumb_cap_w.png

Start /wait parameter not working on GPO computer startup script

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

Answers (1)

Posted by: Chris.Thomson@Sitel.Com 11 years ago
Yellow Belt
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.


Comments:
  • 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 - TheMechanic 11 years ago
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ