Well, here we go again. In addition to my 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 shut your Windows XP computer off. In my How To Automatically Shut Down Your Windows Vista Computer we stepped through the same idea. And now, here’s Windows 7. Guess what? Not too different. So let’s get going.
For this How To, I’m using Windows 7 Release Candidate (RC). Hopefully not too many changes between now and the final version of Windiows 7 changes in regards to running a scheduled task. Below is the first screen shot after I clicked on the Start button and Control Panel. You’ll find the Scheduled Tasks under System and Security.
Click on System and Security and you should see the Administrative Tool selections at the bottom of the control panel window. Click on Schedule Tasks and you’ll be presented with the screen below.
Click image for larger view (800px)
The Task Scheduler is pretty much the same in Windows 7 as Windows Vista. The Task Scheduler can look intimidating but it’s not too bad. Just move forward. We are going to look at one task and not all the extra stuff in Task Scheduler.
In the Actions column on the right, click Create Basic Task…
You’ll see the following window and I’ve already filled in the Name and Description of our task.
Click image for larger view
After clicking Next you’ll see the Task Trigger screen. We want to shut down our Windows 7 computer in the middle of the night, every night so we’ll pick Daily.
Click image for larger view
The next screen you’ll see is the Start Date and Time screen.
Click image for larger view
The following screen is the Action screen. Let’s Start a program.
Click image for larger view
The next screen you’ll see is the Start a Program screen.
Click image for larger view
And finally the Summary screen.
Click image for larger view
Let’s take a look at our task in the Active Tasks list.
Click image for larger view (800px)
Double-click the Task Name if you need to work with the settings.
Here’s the screen when the task fires off and starts to automatically shut down Windows 7. A window pops up telling us that Windows will shut down in less than a minute. You can click on the Close button but that will just close that window and Windows itself will continue to shut down.
Click image for larger view
There’s quite a bit of detail with the shutdown.exe command and here is the output when you run the shutdown.exe /? command at the command prompt in Windows 7. It lists the choices of how you want to run the shutdown.exe command.
Click image for larger view
There you have it. Now you can automatically shutdown your Windows 7 computer.
Adrian says
When i try & run the last step it automatically closes any suggestions?
baidyabati says
i hav done all da steps….but i cant find da shutdown task in da active task list……what would be da problem??? wat shud i do??? plz e mail me da answer sir……….
Andrew Hall says
Previously I wrote many programs to achieve this. It’s great that its now built in 🙂
mus says
I’ve found others too, but this is one is the most simple and helpful. thanks
Jaivik Rabara says
Thanks a lot dud..
i really need for this..
i have night unlimited plan for broadband so when i forget to close internet then it chargeable for me.
now i can shutdown my laptop on time every day with tension free.
thanks for hard work out and kind help.
Asukicco says
Hi, I’ve just now found this post while googling for automatic shutdown and this is indeed the best way to do it. Exactly what I was searching for. Thanks : D
Bill says
Jaivik Rabara » Glad it could help.
Bill says
Asukicco » Thanks Asukicco, glad to hear it.
Bill says
Landantwenty » Thanks for stoppin’ by. I love Linux. However, some of us have to use Windows and like it.
Bill says
Okay, time to add, “Play nicely in the comments.” to my comments policy right above this box.
Greg says
I’m sure its possible but I don’t know how to achieve this. Can I set my system to shutdown after a certain amount of non use? say 5 hours?
Maurice Arney says
Bill… Why not just delete crap like that? Hateful remarks like that do not deserve space in your forum.
Joe says
This is a really easy setting, wonderful. I was using download program to control auto shutdown, Thanks, man. If there is an explanation on command prompt setting for shutdown.exe, that would be so cool.
yakuk says
wow it seems to take so much long time to automate the task that i dont think it will save me any time to automate computer shutdown.
I usually download the automated tasks I need from this macro collection.
Scott says
I am unclear if this will be a set and forget thing or do you have to re-set the date every day. I have a computer dedicated to playing music and want it to shut down at 8pm every day.
Will this setting do that?
Bill says
Scott » Hi Scott. Yes, this will happen every day automagically.
Peter says
I just scheduled a task now. I didn’t even know that there is a shutdown.exe 🙂 This should be a virus 🙂
AJ says
Thank you so much! I keep leaving my notebook on at night, and the habit led to me frying my last notebook. Your tutorial was so easy to follow; I am definitely going to bookmark you for other PC questions!
Bill says
AJ » Glad it helped AJ.
pasco mls says
It’s almost the same with Windows Vista. Loved the screenshots, it made the steps easier to follow.
nicole says
I dont think it will save me any time to automate computer shutdown..Its a very easy to setting..
Heather Clyne says
What does ‘add argument’ and ‘start in’ do and how to use? or where to find out such info
r_ig says
After recently migrating from XP, I have to say it’s taken me longer than expected to grasp all the functions of Windows 7. I quick shutdown.exe is exactly what I was looking for, and as a previous poster stated, the step by step guide and pictures made it a breeze to understand.
Bill says
Heather Clyne » Sometimes, when you run a program like shutdown.exe, anything after that command (.exe) is referred to as an argument. However, not all programs can have arguments.
A program must be written so it can interpret those arguments, aka command-line arguments. So “shutdown.exe /s” means the “/s” is an argument or command-line argument.
“Start in” means what folder do you want the command to start running from? Do you want it to start running from C:\ or C:\Windows, etc.
Hope that helped. 🙂
arafinshaon says
Tnx dude 🙂 I didn’t know this trick :S
abegail says
The easiest thing to do is go in the registry and change the settings:
In the registry, go to HKEY_CURRENT_USER\Control Panel\Desktop.
Double click on AutoEndTasks and change the value to 1 from the default value of 0
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control
Double click on WaitToKillServiceTimeout and change the milliseconds value. For example, if it says 3,000 milliseconds then that equals 3 seconds. Change it to 1,000 for 1 second.
Rinoplastica says
Wow! Great tool. It will definitely help me when the night while I sleep, the computer makes the rendering of my videos. After a couple of hours I need to get up and turn it off. Not any more.
Bill says
building material » Just set it once and you’re good to go.
Tacori says
OMG, thanks for posting this. My Windows 7 froze up yesterday and I haven’t been able to shut it down. I will give this a try
kingskull says
Thank you so much for this great tutorial,
this work great when there is no programs need to be closed
sometimes programs lik MS Word or Adobe Photoshop need to be closed manualy because it will ask for saving the work or not before closing it. If I set my pc to be shutdowend a screen apeear to ask if I wish to force the computer to be shutdown or not
what I want to say is there a way to AUTO save and close programs and after that it will shutdown automaticly without losing the work?
thanks and sorry for my English
Ls says
Hey, Bill. Is there any way to make it give a longer warning time than “less than a minute”? Sometimes it’s not enough time for me to save everything I’m working on or finish a conversation or whatever.
I also wish there was a way to abort it if I am working on something important and need to keep going. Once it notifies you, it doesn’t seem to affect it if I go into task scheduler and stop it.
dustinfox says
LS, Use the -t option to specify the number of seconds before shutdown (i.e. -t 60 -t 120 etc)
You can type shutdown -a at a command prompt at any time to abort the shutdown. The -a option means abort.
Ls says
dustinfox, thanks so much for the info. Do I specify the -t under ‘arguments’?
dustinfox says
Actually, if you look at the screen shot above showing the shutdown options, it is a forward slash not a dash. So yes, you would include a /t90 if you wanted 90 seconds or a /t120 if you wanted 120 seconds.
Here is what mine looks like:
C:\Windows\System32\shutdown.exe /s /t 90 /c “System will be shut down in 90 seconds. Please exit all programs”
Ls says
dustinfox: you are awesome. thank you!
Shams says
Thanks Bro. Helped me a lot.
K. says
Hey there,
I think I pretty much followed you’re instructions but somehow I don’t get the task started. When I see the summary screen I click Finish but the task just won’t appear in the Active Tasks List. Where’s the magic button to tell my PC: “Yes I really really do want to shut you down!” …?
Drew says
Can you use this to just logoff? What would the command be?
Bill says
Drew » Yes try the /l switch. Place it where the arguments go. See screenshot above in the middle of the article where the /s is but just use /l
Good luck.
Josh says
reply to K.
Push the refresh button below that list
Bill says
Misrosoft Vibe » Try /h that should do it.
Jonathan says
I don’t want to use this daily, so I just hit once. However re creating the shutdown, I have to rename it. Is there a way to pull up the old one and “re-run” it?
Thanks
Ls says
Jonathon, what I have done is set up the shutdown as described in this article, and then if I don’t want to use it for awhile, I just go into the Task Scheduler Library and right-click on it and select ‘disable.’ Then later when I need it again, I go in and select ‘enable’ again. That way it’s always there and you don’t have to set it up again.
Jonathan says
Thanks, I’ll try this in a bit.
Kacey says
help, it doesn’t show up in the active tasks
is it only active when it is in use?
Bill says
Kacey » You might try backing out of the list and going back in.
roger says
hi
is there away to set this to turn a windows 7 pc back on if it is shutdown
Nguyen Hoai Tra says
It’s improve my schedule ! Thank you very much ! bep ga