How To Automatically Shut Down Your Windows XP Computer

by Bill on December 25, 2007

It’s been said, “Not owning a computer is the most secure computer.” While that’s true, we need to take steps to keep our computer secure.

As a general rule, I like to shut my computer off when I’m away from it for long periods of time. That includes going out for the day or night, as well as going to sleep. Sometimes it’s hard to remember to shut it off. So in this article I’ll show you a way to shut your Windows XP computer off automatically.

Windows XP comes with a program called shutdown.exe and is located in your system32 folder which typically resides under C:\Windows or the main folder where Windows XP was installed.

So let’s set this up quickly:

1. Go to “Start->Control Panel” and click on “Scheduled Tasks” if you’re in “Classic View”. If you’re not in “Classic View” you are probably in “Category View”. In “Category View” you’ll click on “Performance and Maintenance”. Then click on “Scheduled Tasks”. You’ll see the following screen. Double-click the “Add Scheduled Task” icon.

Scheduled Tasks

2. Click “Next” on the “Schedule Task Wizard” screen (below).

Windows XP Schedule a Task Wizard

3. Click the “Browse” button on the next screen that lists the different applications you can select from (below).

Windows XP Schedule a Task Wizard

4. Browse to C:\Windows\system32 and select the program shutdown.exe (below).

Windows XP Schedule a Task Wizard

5. After selecting shutdown.exe, select “Daily” for “Perform this task:” (below).

Windows XP Schedule a Task Wizard

6. I sleep during the night. That’s why I shut my PC down automagically at 3:00am (below). But, I run some jobs automatically at 1:00am – virus scan and spyware scan, which will be part of a future article. Feel free to adjust this time to fit your schedule.

Windows XP Schedule a Task Wizard

7. You’ll be asked to provide a user name and password that will be used to run this task (below). Warning: If you don’t know your password, that ok. You can add or change it later. If you don’t provide the correct password, you’ll get an error screen after this step. However, you’ll still be able to finish this process.

Windows XP Schedule a Task Wizard

8. At this point you’ve successfully added a new schedule task to run at 3:00am. However, let’s click on the “Open advanced properties fro this task when I click Finish” checkbox and click “Finish” so we can add some command line parameters to shutdown.exe (below).

Windows XP Schedule a Task Wizard

9. You’ll be presented with the following screen.

Windows XP Schedule a Task Wizard

10. Add the following command line parameters as seen below and here – C:\Windows\system32\shutdown.exe -s -t 60 -c “Daily Shutdown” -f. The -s stands for “Shutdown the computer”. The -t 60 stands for “Set timeout for shudown to xx seconds. Feel free to adjust that. You never know when you’re going to be working at 3:00am, so it’s nice to have 60 seconds to prepare for the shutdown. The -c stands “Shutdown comment” which shows up on the screen when the PC is shutting down. And finally the -f stands for “Forces running applications to close without warning”.

Windows XP Schedule a Task Wizard

11. There’s nothing to change on “Schedule” tab. However, feel free to adjust anything that pertains to your work environment or routine.

Windows XP Schedule a Task Wizard

12. I also leave the “Settings” tab alone. Again, change what you need to or experiment what suits your work style.

Windows XP Schedule a Task Wizard

13. This is the final screen (below) that pops up when the task runs. You will have 60 seconds to close applications if you need to.

Windows XP Schedule a Task Wizard

That’s it!! Now you can rest assured your PC is shut down and half way secure while you’re away from your PC.

If you liked this article, please consider subscribing to The Spinning Donut to receive free articles by email:

{ 41 comments… read them below or add one }

1 Ray February 24, 2009 at 11:08 am

I’ve been searching the internet for tutorials on the subject. This one is the most thorough. It even has screen shots. Thanks, Bill!

2 martin February 28, 2009 at 10:58 am

hi, Bill,

I just wanted to ask you if the image of the switcher belongs to you, since I´d like to use it for a cd cover… in fact we have an idea of using a switcher for the cover, so we actually plan on taking a photo in high def, but I really like the one you use for your article, so I ask!

I appreciate your time and collaboration,

Best,

Martin

3 thinkweird March 16, 2009 at 3:17 am

A good tip.
I use shutdown command directly from a console sometime before I go to bed.

thinkweirds last blog post..Interpreting the Grass-mud Horse

4 Bill Stevens March 25, 2009 at 9:25 am

@Martin – You can get these types of images for free at flickr creative commons. I usually give photo credit to the folks who submit those images. It took me a while to implement that on my blog.

5 Bill Stevens March 25, 2009 at 9:26 am

Thanks. Sorry for the late replies to everyone.

6 simple simon April 22, 2009 at 10:44 am

Bill, great work ! thanks for providing a solid and reliable set of instructions for my quandry. You rock mate !

7 Maurice Arney June 8, 2009 at 7:23 am

Just a quick comment on this excellent tutorial. One modification was required for the script to run successfully. Because the comment includes a space, I needed to enclose it in two sets of quotation marks in order for it to run.

Thanks!

8 Az July 1, 2009 at 8:50 pm

Thanks, the stuff is excellent !!

9 Bill July 1, 2009 at 10:57 pm

@Az: Thanks. :)

10 Tim July 30, 2009 at 7:07 pm

Can I use this as well to turn my PC on..?

11 Bill July 31, 2009 at 10:13 pm

@Tim – You can typically do this in the CMOS/BIOS settings of your PC if you can to them. There’s a hot key (sometimes Enter or F10) when your computer boot to go into the computer setup or BIOS settings. You’ll want to look for Power management type settings. That’s where you’ll see something about having your PC turn on automagically.

12 Rob August 29, 2009 at 6:47 am

Hah! I knew I was doing it right!
So, why doesn’t my computer shutdown at night? I mean, I have it set up exactly as you do (without the same domain name and password of course).
It works whenever I test run it, or change the clock to when it’s supposed to execute said task.
My machine is set to be password protected (locked) after the screen saver engages. Maybe that’s the problem? I don’t want to disable that though. Gotta make sure kids can’t get on here.

13 Bill August 29, 2009 at 11:18 am

@Rob – Thanks for stoppin’ by. Have you looked at the event log for any events that are getting recorded at the time you’re trying to automatically shutdown? That might tell us something first.

This should work even if your password-protected screen saver is on.

14 Rob September 1, 2009 at 3:46 am

Well, I found out what the problem is. I forgot to include the -f parameter.
Now the system shuts down every night like it’s supposed to. Thanks for the guide. I appreciate your response as well!

15 Owens Roofing September 3, 2009 at 7:49 am

Excellent step-by-stp guides given on how to shut down our computer easily. It has been weeks I never run any antivirus or degramentation because I couldn’t find time to do that. I’m going to follow your step on my XP and run antivirus and spyware automaticly before shut down. Probably, now I can have a good night sleep. Thanks to you.

16 Bill September 3, 2009 at 1:23 pm

@Owens Roofing: Good luck. A lot of antivirus and/or anti-spyware software allows for you to automatically shutdown your computer so keep in mind you might not need all these steps.

On another note, for a bit less “spammy” looking comment, use your real name in the name field instead of your business name. Makes it look like you’re just trying to drive traffic to your site. The link to your website will take care of that, but a real name will help others know you a bit more personally. Or try using (your first and/or last name @ website name). Thanks, Bill.

17 henry September 9, 2009 at 1:13 pm

Hi thanks for the tips on shutting down i have installed screens in different location and would also need a way to turn them back on automatically.
i must say u have sorted out half of my problem and thats what angels do, now the other half is turning my pc on

Thanks

18 Bill September 9, 2009 at 8:47 pm

@henry: Thanks for stoppin’ by. Look in your bios to see if it includes waking up your pc.

19 Dsl vergleich September 10, 2009 at 1:44 pm

That is a very useful article. Thank you so much for it. I always have trouble with everyone leaving the computer on, ow this way i can ensure power saving. By the way does the computer still shut down even when someone is still working on it ? And if so does it give a warning ?

20 Bill September 10, 2009 at 8:27 pm

@Dsl vergleich: It will shut down in 60 seconds so you have time to close down any programs. But there is a switch you can use to provide an abort. I just don’t know what that switch is at the moment.

21 Smii October 18, 2009 at 2:30 am

If you want to abort system shutdown go to start>run then
type in shutdown -a

22 Bill October 18, 2009 at 1:03 pm

@Smii: Great tip!! I’ll give a try.

23 hs December 18, 2009 at 12:46 am

hi,
i tried doing this but it doesn’t work on my pc the “shutdown.exe” file does execute but nothing happens after that, i mean its still “on” as if nothing happened .i followed all the steps above then what could be the problem.also i tried manually executing shutdown.exe but it does not have any effect what could be the problem????

24 Bill December 18, 2009 at 6:02 am

@hs: Try running a virus scan first to make sure you’re virus-free.

25 Barrie January 8, 2010 at 2:38 am

Hello
My folder System 32 only has shutdown,(says its Windows Remote Shutdown Tool)…is that the same thing for automatically turning off computer?
Doesnt have an “.exe” like your photo shows.
The before (shsvcs.dll) and after (sigtab.dll) are the same folder as what you show…is it about remote shutdown?Right click the shutdown go to properties say its an application, is that the same as an executable file? Sorry if I seem lame lol
Thanks for any help

26 Bill January 8, 2010 at 7:44 pm

@Barrie: Hi Barrie, thanks for stoppin’ by. You’re viewing the application which is the .exe. By default, Windows doesn’t show you file extensions. I just happened to turn my file extensions on to display. You can do that by going to Tools->Folder Options in Windows Explorer. There’s a setting in the Advanced settings: list called “Hide extensions for known file types”. Uncheck that.

27 ken January 9, 2010 at 3:39 am

I cannot browse to system32 — I’ve never had a computer actually, where you could. I can browse there using explorer by manually adding /system32 when I am in the WINDOWS folder, but I’ve NEVER been able to see system32 on ANY cmputer without manually typing in, regardelss of folder settings. Is there any other way to do this?

28 Shrikant January 9, 2010 at 9:13 am

U r just superb Dude………………………..!

29 xp-error January 22, 2010 at 11:40 pm

I always have trouble with everyone leaving the computer on, ow this way i can ensure power saving.

30 DO February 15, 2010 at 1:37 am

Thank you very much, it’s really useful

31 Peter CNA Training May 20, 2010 at 12:26 pm

great post.. I have wondered how to do that, as i leave files downloading and goto bed. I can now get it to switch off after, thats cool!

32 My School Grants July 31, 2010 at 7:00 am

Great post. I’m always downloading things overnight too. I’m sure auto switching off with help some with my energy bills :D
My School Grants recently posted..Response cached until Sun 1 @ 12:59 GMT (Refreshes in 24.00 Hours)My ComLuv Profile

33 cheap fridge August 3, 2010 at 3:12 am

great time saver tip !

34 Talal August 4, 2010 at 3:17 am

Hi Bill,

I have got the same problem as hs and I am following all the steps right and writing C:\Windows\system32\shutdown.exe -s -t 60 -c “Daily Shutdown” -f. The -s in the field.

I can’t run “shutdown.exe” from run, cmd appears and nothing happens and I am certainly virus free.

Any thoughts?

35 Bill August 4, 2010 at 6:38 pm

@Talal: Are running it from Start menu then the Run box? Try opening a command prompt window so when you run it you can see any errors that appear.

36 Talal Sadiq August 5, 2010 at 8:29 am

@Bill: I have tried opening command prompt but no error comes up when I run “shutdown.exe” but when I run “shutdown.exe” from start->run command prompt window appears and goes away, I have tried print screen but can’t get the cmd message that comes on.

37 Phil August 5, 2010 at 10:59 pm

I didn’t know this was built into Windows XP. Thanks for this tip it will help preserve my PC when I’m sleeping. I remember a command shortcut that you can place on your desktop to activate ctrl-alt-del when you want to walk away from your pc and lock the screen. I’ll have to look for that, it seems to be a good way to protect your pc too.
Phil recently posted..Approaching Women- 14 Tips and AdviceMy ComLuv Profile

38 Bill August 5, 2010 at 11:04 pm

@Talal Sadiq: At the command prompt can you type in shutdown.exe /? to get a help screen for the command? Also check that it’s in your c:\windows\system32 or c:\win\system32 folder. Also at the command prompt you can type in the word “path” without the quotes and see if c:\windows\system32 is in the path.

39 Referidos Sumaclicks August 10, 2010 at 5:29 am

Very interesting tutorial. There are a lot of applications that make it, but is better to do as you say.

Thanks

40 Andy August 27, 2010 at 8:35 pm

This didn’t work for me. I went into scheduled tasks to look at the status and it read “The scheduled task did not run because no user account password was entered.” I left the user account as what it came up with and the password empty. I don’t use a password to get onto the computer. How do I fix this issue?… Please help

41 Bill August 29, 2010 at 6:20 am

@Andy: Hi Andy, you could create a new user called BackupUser and assign a password. Then go back to the screen that asks for the login information for running the shutdown program. Or you could assign a password to your login. If you want to autolog yourself in with a password there is way to do that too – https://www.microsoft.com/windowsxp/using/setup/learnmore/tips/knox2.mspx

Leave a Comment

CommentLuv Enabled

{ 31 trackbacks }

Previous post:

Next post: