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

Support for Windows XP has ended

Microsoft ended support for Windows XP on April 8, 2014. This change has affected your software updates and security options. Learn what this means for you and how to stay protected.

This article has been archived. It is offered "as is" and will no longer be updated.
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.
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.

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

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

Article ID: 814761 - Last Review: 12/08/2015 02:03:41 - Revision: 5.6

Microsoft Windows XP Professional, Microsoft Windows XP Professional SP1, Microsoft Windows XP Home Edition, Microsoft Windows XP Home Edition SP1

  • kbnosurvey kbarchive kbautohotfix kbhotfixserver kbqfe kbwinxpsp2fix kbwinxppresp2fix kbfix kbbug KB814761