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.
2. Click “Next” on the “Schedule Task Wizard” screen (below).
3. Click the “Browse” button on the next screen that lists the different applications you can select from (below).
4. Browse to C:\Windows\system32 and select the program shutdown.exe (below).
5. After selecting shutdown.exe, select “Daily” for “Perform this task:” (below).
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.
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.
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).
9. You’ll be presented with the following screen.
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”.
11. There’s nothing to change on “Schedule” tab. However, feel free to adjust anything that pertains to your work environment or routine.
12. I also leave the “Settings” tab alone. Again, change what you need to or experiment what suits your work style.
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.
That’s it!! Now you can rest assured your PC is shut down and secure while you’re away from your PC.
Ray says
I’ve been searching the internet for tutorials on the subject. This one is the most thorough. It even has screen shots. Thanks, Bill!
martin says
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
thinkweird says
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
Bill Stevens says
@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.
Bill Stevens says
Thanks. Sorry for the late replies to everyone.
simple simon says
Bill, great work ! thanks for providing a solid and reliable set of instructions for my quandry. You rock mate !
Maurice Arney says
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!
Az says
Thanks, the stuff is excellent !!
Bill says
@Az: Thanks. 🙂
Tim says
Can I use this as well to turn my PC on..?
Bill says
@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.
Rob says
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.
Bill says
@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.
Rob says
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!
Bill says
@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.
henry says
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
Bill says
@henry: Thanks for stoppin’ by. Look in your bios to see if it includes waking up your pc.
Dsl vergleich says
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 ?
Bill says
@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.
Smii says
If you want to abort system shutdown go to start>run then
type in shutdown -a
Bill says
@Smii: Great tip!! I’ll give a try.
hs says
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????
Bill says
@hs: Try running a virus scan first to make sure you’re virus-free.
Barrie says
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
Bill says
@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.
ken says
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?
Shrikant says
U r just superb Dude………………………..!
DO says
Thank you very much, it’s really useful
Peter says
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!
Talal says
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?
Bill says
@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.
Talal Sadiq says
@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.
Phil says
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.
Bill says
@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.
Andy says
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
Bill says
@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
Neil McC says
very helpful and very clear. many thanks!
mark says
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!
Sally Scheer says
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??
Cole Stan says
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.
Melissa says
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
Bill says
@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.
Nichole says
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)
Andrea says
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?