Friday, August 24, 2012

How to automatically shutdown Windows 7 at a specified time


Microsoft Store


The Task Scheduler program in Windows 7 is very useful for allowing your PC to perform certain tasks automatically and, luckily, it's very easy to use.
The following example shows how to shutdown Windows 7 at a specified time.

First, click the Start button, open the Control Panel, then click System and Security.

 Click image to enlarge

Click Schedule tasks, which can be found under the Administrative Tools heading, to see the following screen. Alternatively, you may click the Start button and type "Task Scheduler", without quotes, into the search box and run Task Scheduler from here.

Click image to enlarge

This may look complicated but it's actually quite easy to use. On the right, there is a column titled Actions. Click "Create Basic Task..."
A new window will appear which will allow you to enter a name and description of the task. When you are finished click next.

Click image to enlarge

Now, you will see the Task Trigger screen. Here, you can specify when your new task will occur.
For this example, we only want the computer to be shutdown automatically once, so select the "One time" option.

Click image to enlarge

Click Next to see the following Window, which will allow you to set the time and date for when you want the task to occur.

Click image to enlarge

Click Next again to choose which action to perform. In this case, we will start a program.

Click image to enlarge

Click Next to go to the Start a Program screen.
Enter C:\\Windows\System32\shutdown.exe in the program/script box, and /s in the Add arguments text box. When you are finished, click Next.
A full list of arguments can be found at the end of this post.

Click image to enlarge

The Summary window will be displayed.

Click image to enlarge

Now, click Finish.
Look in the Active Tasks list and scroll until you find the task you have created.

Click image to enlarge

If the task does not appear press refresh, then scroll through the list again.
If you want to change any of the settings double click on on the name of the task, "Shutdown" in this case,  you will then be presented with the following screen:

Click image to enlarge

To make sure that the task will be run properly, look in the general tab and scroll down to Security options.
Click "Run whether user is logged on or not" and "Run with the highest privileges".

If you change your mind and want to delete the task you created, click on its name then click delete on the right side of the screen.

When the task is run, a message box will appear saying Windows will shutdown in less than a minute:



The image below shows the list of parameters for shutdown.exe.

Click image to enlarge

This can be seen by opening the command prompt and typing "shutdown.exe /?", without quotes.


If you want to log off or restart the computer instead of shutting down, you would enter "/l" (Log Off) or "/r" (Restart) in the Add arguments text box in the Task Scheduler wizard.
You can also use the "/h" parameter to make the computer hibernate.
Refer to the image for the full list of shutdown.exe parameters.

No comments:

Post a Comment