Windows – How to allow non-administrators to use shutdown.exe

windowswindows task schedulerwindows xp

As per the comments in the accepted answer to this question, I'm having issues running a scheduled task which calls shutdown.exe, even when the user is an administrator. I'm administrating someone else's machine using their main account, so I can't exactly change too much as they like things the way that they are.

What's really strange is that I can only make the task run if:

  1. The user is an administrator.
  2. They have defined a password.

For some strange reason unknown to me, not only does a user have to be an administrator, but they also must have a password on the account in order for the scheduled task to run. Otherwise, I get access denied errors and the task fails to run.

How can I make this work without having to force the user to define a password for their account?

Essentially, the remaining goal is to have the computer shut down (no matter who is or is not logged in) at 11pm every night.

I run into the following errors below when I try to set the task in the Scheduled Tasks program:

enter image description here

An error has occurred while attempting to set task account information.
The specific error is:
0x8007005: Access is denied.
You do not have permission to perform the requested operation.

For the record, here's my security policy, you can see that my user has the permission to force shutdown and manually shutdown the computer:

enter image description here

Best Answer

The simplest solution would be to configure said scheduled task to run under an Administrator account. You do not need to use the same account as the usually-logged-on user – simply provide different credentials when creating the task.

If you do not want "Administrator" to have a password, you could just create a dedicated account just for the scheduled task. (A limited User account will work as well, if you apply the fix below.)


The shutdown.exe program needs SeRemoteShutdownPrivilege to run, instead of the usual SeShutdownPrivilege – my guess is that it uses the same RPC for shutting down both local and remote machines. (This would explain the need for a password, too – by default, only console logins are exempt, which obviously does not include RPC.)

You can grant SeRemoteShutdownPrivilege through secpol.mscLocal PoliciesUser Rights Assignment, by editing the "Force shutdown from remote system" entry.

  • You can create a dedicated account for the task and add it here (best choice).
  • For interactive command-line usage by any user, you can add INTERACTIVE.
  • For scheduled tasks by any user, add BATCH.
Related Question