Error » Certification & Programming center Error !! » Programming tutorials » Single Click Shutdown

Programming tutorials All Knowledge Info and links to posted here

Post New Thread Reply
  Single Click Shutdown
LinkBack Thread Tools Display Modes
Old 23-Feb-2007, 06:41 AM   #1 (permalink)
Fixed Error!
 
kingaff's Avatar

Posts: 330
Join Date: Feb 2007
Rep Power: 2 kingaff is on a distinguished road

IM:
Default Single Click Shutdown

SINGLE CLICK SHUTDOWN


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.
All you need to do is... right-click on an empty Desktop spot -> select New -> Shortcut -> type shutdown followed by a space, and then enter one or more of the parameters listed below -> click Next -> type a suggestive name for your new shortcut -> finally, click Finish.
This is the Shutdown.exe (located in %windir%\System32, usually C:\Windows\System32) syntax:

shutdown [-i|-l|-s|-r|-a] [-f] [-m \\computername] [-t xx] [-c "Text"] [-d[u][p]x:yy]
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]x: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). CanNOT be used with the -m option unless the current user has Administrator 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 Administrator 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.

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

tells your computer to shutdown after waiting for 3 seconds while the System Shutdown window will display text above in the Message area.

Optional: after you're done creating your customized shortcut for shutdown -> right-click on it -> select Properties -> enter your desired key "combo" in the Shortcut Key box (example: Ctrl + Alt + End) -> 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 XP computer
kingaff is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
   


   
Post New Thread Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT -8. The time now is 10:55 AM.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

DMCA Policy

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227