Shut Down Command

Status
Not open for further replies.

HiJackThis1.99

Posts: 91   +0
XP OS


Is there a command such that it shuts down the computer?

I found something called,
C:\WINDOWS\System32\shutdown.exe
But it does nothing.
 
shutdown.exe....

Shutdown [{-l|-s|-r|-a}] [-f] [-m [\\ComputerName]] [-t xx] [-c "message"] [-d[p]:xx:yy]

Parameters

* -l - Logs off the current user, this is also the defualt. -m ComputerName takes precedence.
* -s - Shuts down the local computer.
* -r - Reboots after shutdown.
* -a - Aborts shutdown. Ignores other parameters, except -l and ComputerName. You can only use -a during the time-out period.
* -f - Forces running applications to close.
* -m [\\ComputerName] - Specifies the computer that you want to shut down.
* -t xx - Sets the timer for system shutdown in xx seconds. The default is 20 seconds.
* -c "message" - Specifies a message to be displayed in the Message area of the System Shutdown window. You can use a maximum of 127 characters. You must enclose the message in quotation marks.


Of course, There's an alternative command I personally find far more useful -TSSHUTDN.exe ...

TSSHUTDN [wait_time] [/SERVER:servername] [/REBOOT] [/POWERDOWN]
[/DELAY:logoffdelay] [/V]

wait_time Seconds to wait after user notification before
terminating all user sessions (default is 60).
/SERVER:servername The server to shut down (default is current).
/REBOOT Reboot the server after user sessions are terminated.
/POWERDOWN The server will prepare for powering off.
/DELAY:logoffdelay Seconds to wait after logging off all connected
sessions (default is 30).
/V Display information about actions being performed.

Another method to generate a shutdown is to use the "taskkill /IM process.exe" command to end a process your not supposed to, but first you have to know what such processes you can end with it :)
 
You could of easily googled this :D

For restart:
SHUTDOWN -r -t 01

For shutdown:
SHUTDOWN -s -t 01

-r or -s tell the computer to shutdown or restart, -r being restart -s being shutdown

-t 01 means timeout, so with 01 it will wait 1 second to issue the command.

EDIT: Seems me and spike were doing the same thing, haha.
 
I must confess - I did go straight to google, but quickly realised that all I needed was a cmd window. lol
 
Spike said:
I must confess - I did go straight to google, but quickly realised that all I needed was a cmd window. lol
:haha: :haha:

dig in windoze or system32 u found lotsa programs just open command prompt and type exsample: append /? and hit enter.. all switch etc. pop up

google is very usefull tool too :D
 
Indeed. I know most of them and what they do already anyway lol. It's their switches I forget all the time. :D
 
Status
Not open for further replies.
Back