Skip to main content
NetworkAdminKB Logo

Knowledge Base

Go Search
NetworkAdminKB.com
Knowledge Base
VBScript Library
Utilities
  
NetworkAdminKB.com > Knowledge Base > Knowledge Base > Windows2003 > How to schedule a computer reboot in the computer startup script  

How to schedule a computer reboot in the computer startup script

Author Details
Author: NetworkAdminKB.com
Created: 2008-09-25
Modified: 2009-05-15
Article Content

Issue:

When you attempt to use a GPO computer startup script to run a reboot command the computer does not respond to the reboot command.  This affects all reboot commands from Microsoft, custom programmed reboot commands, as well as other vendors. 

 

Cause:

It appears that when any reboot command is run from the computer startup script it is intercepted or ignored regardless of which utility is used to initiate the reboot.

 

So far in testing no reboot command has been able to reboot the computer when run from the computer startup script.

 

Solution:

Method 1

Use a utility to schedule the reboot to run in the near future.  This will allow the computer startup script to completely finish.  Once the schedule task runs it is outside the control of the process that is preventing the computer reboot during the startup script.

 

The best utility that I have found to accomplish this is Soon.exe from the Windows 2000 Resource Kit.  It can be downloaded free from the Microsoft web site. 

 

When using Soon.exe I would suggest scheduling the reboot for 60-90 seconds in the future, to give the computer plenty of time to complete its other tasks and for the computer startup script to finish.  Of course proper testing will be required for your own environment.

 

Soon.exe will also automatically remove the command from the schedule task list once it runs.

 

Other Scheduling Utilities

Schtasks.exe from Microsoft available on Windows 2003

AT.exe from Microsoft available on Windows NT, 2000, 2003

 

Method 2

Use psexec.exe from System Internals to run the reboot command under a specific user context.

 

Psexec.exe allows for the passing of a user password via the command line in a batch file.  This allows the execution to be scripted via the computer startup script, but bypasses the prevention of the computer reboot.

 

More Information:

Windows 2003 SP2 was the OS version that this was tested on.

Related Articles
 
Last modified at 5/16/2009 12:03 AM  by TEMPLATE\kbadmin 
 
 NetworkAdminKB.com
 Copyright © 2008 NetworkAdminKB.com, All rights reserved. Terms of Use | Contact US