Tuesday, September 27, 2011

Making your own quick shutdown for Windows 7


This is a screenshot of Command Prompt's little window which appears when you choose it from the little menu which pops up if you click the Start button, or if you type in 'CMD' (without the quotes) into the little Search box above Start. I've got it showing the various parameters you can use for its various functions.

For example: Let's say that I want to make a desktop shortcut which with one click will immediately shut down the computer. And let's say I want to tell it just how I would like it to do that. I would use some of those parameters from the list above. (To see them more clearly, please click the image to enlarge it)

To make the shortcut, pick an empty spot on your desktop, then right-click for a menu. Choose 'New' and click it. On the sub-menu which appears, click on 'Shortcut' to open another little window. At the flashing cursor in the box under 'Type the location of the item', type in the following, exactly as shown, because the spacing is important, and this is where we use those parameters expressed above as forward slashes followed by a single letter, after we've typed the main part of the address.

C:\Windows\system32\shutdown.exe /s /f /t 05

So that's C:\Windows\system32\shutdown.exe(a single space)/s(another single space)/f(another single space)/t(another single space)05. And what does that tell Windows? It says: Using shutdown.exe, shut down my computer (the /s), and force-close any open programs without notification (the /f), and do that within five seconds (the /t 05). You can leave off that /t for time and the 05 for the number of seconds if you like. That part's not really essential, because there's a default time setting of 30 seconds anyway - but if you want to make sure it shuts down quickly, then you can add that /t and a space and two digits for the number of seconds.

You can also make a similar shortcut for a quick Reboot, and it would be composed like the shutdown one, except in place of that first /s you would use a /r and you can still use the /f for "force-close" next if you wish, but you don't need anything about the timing, because it's not necessary. So the one for the Reboot looks like: C:\Windows\system32\shutdown.exe /r /f

After typing either of those file-path addresses into that little box, then simply click on Next down below to continue. That takes you to a new window where you can name your new shortcut. The first would simply be Shutdown, and the other of course would be Reboot. Then find yourself a couple of icons to use for those in place of the generic ones that will appear as you've gone through that creation process, and you're done. One click on either of those, and your computer does what it was told. But I hasten to add here, you have to have it set to respond to a single click instead of the default double.

And for those of you who are thinking 'this is the same trick we used with XP' you're right - but there's one key difference: the one for XP used a dash before each letter in the parameters, instead of a forward slash. That's important if you want it to work properly. So remember: slash not dash.

No comments:

Post a Comment