I have created a batch file installation so we can upgrade our users to Symantec EP 11 and am struggling with an issue regarding rebooting after the software install. The batch file I'm using calls another batch file to scour the users hard drive to delete all copies of extend.dat and then when done (assuming it passes an errorlevel of 0) it kicks off the Symantec installer by starting Setup. When the install finishes it passes it's errorlevel (which happens to be 3010) back to the batch file which then executes the following code:
:reboot
"c:\program files\landesk\ldclient\sdclient.exe" /msg="Rebooting"
"c:\program files\landesk\ldclient\sdclient.exe" /on reboot /bat /p=%0 /cmds=post-reboot
"c:\program files\landesk\ldclient\sdclient.exe" /reboot
GOTO end
My issue is that when the reboot command is issued it reboots the machine immediately. How can I get it to issue the user a warning that the machine is going to reboot so that they can save their work? I want the reboot to be forced but need some way of letting them save their work. Is there a delay option for sdclient that I can use? Maybe a different way to do this?
Thanks!!
I've always preferred to use the PSTools utilities for things like rebooting because of the facilities they offer for scripts.
http://technet.microsoft.com/en-us/sysinternals/bb897541.aspx
Take a look and see if they help.
Mark Star - MarXtar LANDesk Enhancements
Home of Power State Notifier & Wake-On-WAN for LANDesk
Hello,
try "start /wait" before the command line...
start /wait "c:\program files\landesk\ldclient\sdclient.exe" /reboot
For some additional hints take a look in this great doc: Understanding Batch File Distribution Packages
Regards
Axel
Thanks for those options but they basically do the same thing that the command I'm using does.
What I'm more looking for is the default "Landesk needs to restart your computer" type pop up when a user scan and repair has finished. A nice popup comes up and offers the option of "Snooze" for the reboot but does not let the user cancel. That way the reboot is forced but they can snooze it for a while (pulling the defaults for Scan and Repair would be nice.)
Any way this can be done?
Sounds like your requirements are pushing you into a custom scripting solution. You are probably better of served with writing something in a scripting tool. Yes there may be other ways to hack and slash your way around this, but IMO you will not be happy until you write something that meets your needs. http://community.landesk.com/support/message/10249#10249
Dave, that is pretty much exactly what I want to do.
I'm not a scripting guy though so I have no clue how to go about what you did with the whole option of 90 minutes or midnight thing, etc. Care to share?
The code is a little choppy since I code to get things accomplished, not necessarily to be the most effecient
I have started to cleanup the code a little in my free time to release it to the public so they can generally laugh at the code and scratch their heads. There is a lot of custom crap in there from my shop. My goal is to have it released by end of year. The hard part is to get rid of all the environmental assumptions (e.g., machine has X, folder X exists, etc...) Some weird stuff in there, like what do you do if a reboot is scheduled for midnight and they reboot, don't want them to reboot again.
Plus as Jack will tell you, once you release something there is the entire SDLC you have to deal with concerning the product - YAK...
| ||||||
