This Question is Possibly Answered

1 "correct" answer available (20 pts) 1 "helpful" answer available (10 pts)
6 Replies Last post: Sep 3, 2008 10:50 AM by Zman  
Tom Taylor Rookie 3 posts since
Jul 21, 2008
Currently Being Moderated

Sep 2, 2008 5:17 PM

Notify user of pending reboot when using sdclient /reboot in batch file

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!!

MarXtar Expert 608 posts since
Jul 2, 2008
Currently Being Moderated
1. Sep 2, 2008 5:55 PM in response to: Tom Taylor
Re: Notify user of pending reboot when using sdclient /reboot in batch file

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

ahe Expert 390 posts since
Dec 21, 2007
Currently Being Moderated
2. Sep 3, 2008 3:44 AM in response to: Tom Taylor
Re: Notify user of pending reboot when using sdclient /reboot in batch file

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

Zman Expert 1,115 posts since
Dec 14, 2007
Currently Being Moderated
4. Sep 3, 2008 10:24 AM in response to: Tom Taylor
Re: Notify user of pending reboot when using sdclient /reboot in batch file

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

Zman Expert 1,115 posts since
Dec 14, 2007
Currently Being Moderated
6. Sep 3, 2008 10:50 AM in response to: Tom Taylor
Re: Notify user of pending reboot when using sdclient /reboot in batch file

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...

More Like This

  • Retrieving data ...
LANDesk Community powered by Jive Software's Clearspace ®                                                                        Subscribe| Legal Notices| Investor Relations| Privacy Policy © 2007 LANDesk Software