• Skip to main content
  • Skip to primary sidebar
  • Newsletter
  • Contact
  • About

The Spinning Donut

Helping People Use Technology

How To Automatically Shut Down Your Windows XP Computer

December 25, 2007 By Bill 89 Comments

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 without some kind of external shutdown clock program for XP.

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 secure while you’re away from your PC.

Filed Under: Microsoft Windows

Reader Interactions

Comments

  1. Ray says

    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 says

    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 says

    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 says

    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 says

    March 25, 2009 at 9:26 am

    Thanks. Sorry for the late replies to everyone.

  6. simple simon says

    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 says

    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 says

    July 1, 2009 at 8:50 pm

    Thanks, the stuff is excellent !!

  9. Bill says

    July 1, 2009 at 10:57 pm

    @Az: Thanks. 🙂

  10. Tim says

    July 30, 2009 at 7:07 pm

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

  11. Bill says

    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 says

    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 says

    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 says

    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. Bill says

    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.

  16. henry says

    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

  17. Bill says

    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.

  18. Dsl vergleich says

    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 ?

  19. Bill says

    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.

  20. Smii says

    October 18, 2009 at 2:30 am

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

  21. Bill says

    October 18, 2009 at 1:03 pm

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

  22. hs says

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

  23. Bill says

    December 18, 2009 at 6:02 am

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

  24. Barrie says

    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

  25. Bill says

    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.

  26. ken says

    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?

  27. Shrikant says

    January 9, 2010 at 9:13 am

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

  28. DO says

    February 15, 2010 at 1:37 am

    Thank you very much, it’s really useful

  29. Peter says

    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!

  30. Talal says

    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?

  31. Bill says

    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.

  32. Talal Sadiq says

    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.

  33. Phil says

    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.

  34. Bill says

    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.

  35. Andy says

    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

  36. Bill says

    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

  37. Neil McC says

    September 14, 2010 at 2:51 pm

    very helpful and very clear. many thanks!

  38. mark says

    September 14, 2010 at 8:37 pm

    any idea how to find out your user name and password??? a username defaults into the field, but i know i did not create that, and i have no idea what the password would be. if you know of a way to reset the password, please share. thanks!

  39. Sally Scheer says

    October 2, 2010 at 2:43 pm

    While experimenting with turning on the computer at a specified time and then turning it off after some tasks were run, I was unable to get the shutdown to work right. I gave up and deleted the automatic turn on. HOWEVER. the darn computer still turns on every day at the scheduled time anyway. The scheduled task (turn on) is gone but the turn on still keeps on turning on! How do I get RID of this already deleted scheduled task??

  40. Cole Stan says

    November 3, 2010 at 11:56 pm

    Nice tutorial! This will be very useful to busy individuals who also handles offline works. I doubt if this would be ideal for people who have lots of work online. Auto shut down of PC is not recommended.

  41. Melissa says

    November 7, 2010 at 1:50 pm

    I am unable to locate the schedules task folder under the system and maintenance category and I tried the classic view and could not locate it either. Help

  42. Bill says

    November 7, 2010 at 6:47 pm

    @Melissa: Thanks for stopping by Melissa. Are you administrator of your computer? You can also trying clicking in a blank area of your desktop and pressing F1 for your help. When the help system appears, search on task scheduler. See that helps.

  43. Nichole says

    November 8, 2010 at 9:25 am

    Is there a possible way to prevent the computer from booting up (manually) until a certain time? I want the computer to be off from the time it schedules to turn off until a specific time the next day (even if somebody tries to turn it on)

  44. Andrea says

    November 23, 2010 at 12:07 pm

    Hi Bill,

    I’m trying to implement this at my job. It works on my computer, but not others. On some of the computers the shutdown.exe pops up, disappears, and nothing happens. I have done a virus scan on all of the computers with MS Security Essentials. On other computers I get a 0x80040005 Access is Denied. You do not have permission. All the computers have 2 user accounts on them. One limited and the other is an admin account. When I set the schedule tasks option, I am running it in the limited account with the admin name and password.

    What am I doing wrong?

Newer Comments »

Trackbacks

  1. How To Automatically Protect Your PC From Spyware Using Spybot-Search & Destroy | TheSpinningDonut.com says:
    January 6, 2008 at 11:18 pm

    […] previous article on automatically shutting down your PC at 3:00am. The reason I personally do that is because I run Spybot-Search & Destroy at 2:00am. […]

  2. Protecting Your PC With AVG Anti-Virus Free Software | TheSpinningDonut.com says:
    January 13, 2008 at 3:44 pm

    […] you’ve been reading my blog and you’ve read the post about automatically shutting down your PC, you know I do that at 3:00am.  I also run a complete spyware scan on my pc at 2:00am […]

  3. Two Free Anti-Spyware Programs To Keep Your PC Safe | Learn Technology Online says:
    February 2, 2008 at 9:24 am

    […] Shut Down Your PC Automatically (runs at 3:00am) […]

  4. Six Programs To Help Keep Your Computer Safe And Secure | Learn Technology Online says:
    February 21, 2008 at 12:03 pm

    […] 3:00am – My PCs shut down automagically. Read about it here. […]

  5. Keep Your PC Safe On The Internet? | Learn Technology Online says:
    March 21, 2008 at 12:55 am

    […] If you don’t want to shut your surge protector off, consider implementing automatically shutting off your PC. […]

  6. How To Automatically Shut Down Your Windows Vista Computer | Learn Technology Online says:
    April 10, 2008 at 1:28 am

    […] my article How To Automatically Shut Down Your Windows XP Computer I showed how to set it up so you can use the ShutDown.exe command to schedule and automatically […]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Get Exclusive
Tech Tips

Learn tech topics
with exclusive tips and insights
that I only share with my private
newsletter subscribers.

Popular YouTube Videos

  • An Introduction to Ubuntu 8.04 (over 50,000 views)
  • Running Self-Hosted WordPress - 1 of 3
  • Running Self-Hosted WordPress - 2 of 3
  • Running Self-Hosted WordPress - 3 of 3

Subscribe to my YouTube Channel


YouTube Channel

Categories

Copyright © 2025 · Privacy Policy and Disclaimer · Hosting by HostGator