I am using Macro Scheduler to automate a batch / cmd file for software deployment via Active Directory and Group Policy.
Once I get the compiled exe working correctly I will deploy this via Active Directory.
This package installs some document management software (Hummingbird DM) using a silent Installshield batch file as shown below:
Run Program>"\\bcscnet.ca\dfs\DIST\apps\CLIENT\Hummingbird\DM Client 5.1.0.5\setup.exe" dp="\\bcscnet.ca\dfs\DIST\apps\CLIENT\Hummingbird\DM Client 5.1.0.5\Deployment\PilotStaff\PilotStaff.ini"
This batch file runs in a DOS window silently for about 2-3 minutes. It then pops up window telling a user to click the FINISH button to reboot the computer. It is this last part that I am having problems with. I cannot get Macro Scheduler to reboot the computer.
I have tried using ShutDownWindows>1 - it never gets to the second line because it seems to require that the button FINISH be clicked.
I have tried WaitWindowOpen>window_title but nothing seems to work.
I am thinking that what I need is to say that when the batch file starts set the clock timer at 0 and begin counting. The install takes about 2-3 minutes. After 5 minutes "automatically" restart the computer - never mind about any screen prompts or windows opening - just reboot automatically after 5 minutes. Can I do this with Macro Scheduler - if so how?
Thanks for any input on this one.
John Falloon
Automate a batch file for software deployment using MS
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You should be able to wait for the window with the finish button and then send the enter key to click it.
Alternatively, as you suggest, wait 5 minutes and then shut down the PC:
//wait 5 mins
Let>wait_time=60*5
Wait>wait_time
//Forced Reboot
ShutDownWindows>4
If ShutDownWindows fails try this approach instead:
Press CTRL
Press Esc
Release CTRL
WaitWindowOpen>Start Menu
Send>u
WaitWindowOpen>Shut Down Windows
Send>r
Press Enter
Alternatively, as you suggest, wait 5 minutes and then shut down the PC:
//wait 5 mins
Let>wait_time=60*5
Wait>wait_time
//Forced Reboot
ShutDownWindows>4
If ShutDownWindows fails try this approach instead:
Press CTRL
Press Esc
Release CTRL
WaitWindowOpen>Start Menu
Send>u
WaitWindowOpen>Shut Down Windows
Send>r
Press Enter
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
RE: batch file
Thanks again for the hints. I will try these options out and see if they work.
RE: batch file
I tried both suggestions above - no go.
The long batch file pilot.bat does run and does complete but I still cannot get the system to restart or reboot with the suggestions provided.
I will continue to explore a method.
Thanks for all who have assisted me.
John
The long batch file pilot.bat does run and does complete but I still cannot get the system to restart or reboot with the suggestions provided.
I will continue to explore a method.
Thanks for all who have assisted me.
John
RE: batch file
Finally go the batch file to install "and" reboot.
Here it is:
Run Program>"\\bcscnet.ca\dfs\DIST\apps\CLIENT\Hummingbird\DM Client 5.1.0.5\setup.exe" dp="\\bcscnet.ca\dfs\DIST\apps\CLIENT\Hummingbird\DM Client 5.1.0.5\Deployment\PilotStaff\PilotStaff.ini"
//wait 5 mins
Let>wait_time=60*5
Wait>wait_time
//Forced Reboot
ShutDownWindows>4
Thanks again
John Falloon
Here it is:
Run Program>"\\bcscnet.ca\dfs\DIST\apps\CLIENT\Hummingbird\DM Client 5.1.0.5\setup.exe" dp="\\bcscnet.ca\dfs\DIST\apps\CLIENT\Hummingbird\DM Client 5.1.0.5\Deployment\PilotStaff\PilotStaff.ini"
//wait 5 mins
Let>wait_time=60*5
Wait>wait_time
//Forced Reboot
ShutDownWindows>4
Thanks again
John Falloon