Microsoft KB Archive/814761

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

Article ID: 814761

Article Last Modified on 10/26/2006

-

APPLIES TO


 * Microsoft Windows XP Professional
 * Microsoft Windows XP Professional
 * Microsoft Windows XP Home Edition
 * Microsoft Windows XP Home Edition

-



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.



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 fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Windows XP service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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 &quot;Workaround&quot; 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.

Keywords: kbbug kbfix kbqfe kbwinxpsp2fix kbwinxppresp2fix kbhotfixserver KB814761

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.