Did you know that in Windows XP you can shut down your computer from the (eventually DOS prompt) command line box? Moreover, you can do this by clicking your mouse only once.
Yes, it's true! As we all know that there is a built-in function in Windows XP to shut down our computer. Just like the picture on the left side. But, we accept or not, there are also some people that always wanted shortcut or a possible task that can make his job easier. So this time I will show you the instructions on how to do this. But, as what I always remind to you, I am not liable to any damages that may occur in your operating system if the below instructions will not work properly.
Before I will show you the steps, you must to know first the valid command line switches:
-a = Abort system shutdown in progress ONLY IF the -t xx timeout option was already set to ANY value other than 0. ALL switches except -l and -m are ignored during abort.
-c "Text" = Text comment (case insensitive) to be displayed in the Message area of the System Shutdown window. MUST be enclosed between quotes. Maximum allowed 127 ASCII characters.
-d [u][p]:xx:yy = Reason code for shutdown:
u = User code.
p = Planned shutdown code.
xx = Major reason code. Positive integer number less than 256.
yy = Minor reason code. Positive integer number less than 65536.
-f = Force running applications to close without warning.
-i = Display the shutdown interface (GUI). MUST be the first option!
-l = Log off the current user of the local computer (default action). Can NOT be used with the -m option unless the current user has Sysadmin rights, in which case the -m switch takes precedence.
-m \\computername = Remote/network computer name (most always case sensitive) to log off/restart/shut down. Current user MUST have Sysadmin rights to be allowed to use this switch!
-s = Shut down the local computer.
-r = Shut down and restart (reboot) the local computer.
-t xx = Set shutdown timer to timeout for xx seconds. IF NOT specified defaults to 20 seconds. Allowed values between 0 and 99 seconds. The -a switch is the ONLY one that CAN be used during the timeout period.
So here are the step-by-step instruction on how to make shortcut.
1. “Right Cclick” on an empty Desktop spot
2 Select “New” and on the pop-up menu, select “Shortcut”
3. On the create shortcut pop-up menu, type “Shutdown” followed by a space, and then enter one or more of the parameters listed above.
Example : shutdown [-i|-l|-s|-r|-a] [-f] [-m \\computername] [-t xx] [-c "Text"] [-d[u][p]:xx:yy]
4 Click “Next”
5. Type a suggestive name for your new shortcut then click “Finish”.
The Shutdown.exe is located in %systemroot%\System32, usually C:\Windows\System32 root directory.
NOTES:
The dash (-) in front of these switches can be replaced by a forward slash (/).
Spaces are NOT required to separate the shutdown command from ANY following switches, but ARE required to separate ANY switch from its following parameter(s), if any.
For example:
shutdown -s -c "Shutting down!" -t 3
It tells your computer to shutdown after waiting for 3 seconds while the System Shutdown window will display text above in the Message area.
Optional:
Aafter you're done creating your customized shortcut for shutdown, right-click on it, select “Properties” and enter your desired key "combo" in the Shortcut Key box (e.g. Ctrl + Alt + End) then click OK/Apply. From now on just left-click on your shutdown shortcut or hit that key combination to turn off/restart/log off your computer.

0 comments:
Post a Comment