Automate a batch file for software deployment using MS

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
zeke
Newbie
Posts: 11
Joined: Thu Dec 08, 2005 7:23 pm

Automate a batch file for software deployment using MS

Post by zeke » Thu Dec 08, 2005 7:39 pm

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

User avatar
Marcus Tettmar
Site Admin
Posts: 7391
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Dec 08, 2005 8:45 pm

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
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

zeke
Newbie
Posts: 11
Joined: Thu Dec 08, 2005 7:23 pm

RE: batch file

Post by zeke » Fri Dec 09, 2005 8:34 pm

Thanks again for the hints. I will try these options out and see if they work.

zeke
Newbie
Posts: 11
Joined: Thu Dec 08, 2005 7:23 pm

RE: batch file

Post by zeke » Mon Dec 12, 2005 9:46 pm

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

zeke
Newbie
Posts: 11
Joined: Thu Dec 08, 2005 7:23 pm

RE: batch file

Post by zeke » Sat Dec 17, 2005 1:08 am

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

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts