You Cannot Schedule a Windows XP-Based Computer to Shut Down and Restart by Using the AT Command with Shutdown.exe

Article translations Article translations
Article ID: 814761 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

When you use the at command with Shutdown.exe to schedule a Windows XP-based computer to shut down or restart, the computer does not shut down or restart as expected. When the scheduled shutdown task starts, you may receive the following message in a command-prompt window:
The operation completed successfully.
A required privilege is not held by the client.

CAUSE

This problem occurs because, by default, tasks scheduled by using the at command are run under the Local System account. Shutdown.exe tries to enable certain rights before it executes the shutdown action. The Local System account does not have one of the rights that Shutdown.exe tries to enable, and therefore the action is unsuccessful.

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft Windows XP. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
322389 How to obtain the latest Windows XP service pack

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.

Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language. The global version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date         Time  Version           Size        File name
------------------------------------------------------------
18-Feb-2003  17:04 5.1.2600.1170     17,920      Shutdown.exe

				

WORKAROUND

To work around this problem, use Task Scheduler to schedule the computer to shut down and restart at a specific time. To do so, follow these steps:
  1. Click Start, and then click Control Panel.
  2. Click Performance and Maintenance, and then click Scheduled Tasks.
  3. Double-click Add Scheduled Task. The Scheduled Task Wizard starts.
  4. Click Next.
  5. Under Click the program you want Windows to run, click Browse.
  6. In the Select Program to Schedule dialog box, locate the %SystemRoot%\System32 folder, locate and click the Shutdown.exe file, and then click Open.
  7. Under Perform this task, specify a name for the task and how frequently you want this task to run, and then click Next.
  8. Under Select the time and day you want this task to start, specify a start time and date for the task, and then click Next.
  9. Type the user name and password to run this task under, and then click Next.
  10. Click to select the Open advanced properties for this task when I click Finish check box, and then click Finish.
  11. Click the Task tab.
  12. In the Run box, specify any additional parameters that you want to use with Shutdown.exe.
  13. Click OK.
Alternatively, you can change the account used by the at command, as follows:
  1. Open the Scheduled Tasks folder as described earlier in the "Workaround" section.
  2. On the Advanced menu, click At Service Account.
  3. Type the required account name and password, and then click OK.
Notes
  • This change will affect all tasks scheduled with the at command, not just Shutdown.exe.
  • The account used must have the SeRemoteShutdownPrivilege right on the local system.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft Windows XP Service Pack 2.

MORE INFORMATION

For more information about the shutdown command, type shutdown /? at the command prompt, and then press ENTER.

For more information about the at command, type at /? at the command prompt, and then press ENTER.

Properties

Article ID: 814761 - Last Review: October 26, 2006 - Revision: 5.6
APPLIES TO
  • Microsoft Windows XP Professional
  • Microsoft Windows XP Professional SP1
  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Home Edition SP1
Keywords: 
kbautohotfix kbhotfixserver kbqfe kbwinxpsp2fix kbwinxppresp2fix kbfix kbbug KB814761

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com