PDA

View Full Version : XP shutdown script?



Shpoon
10-07-2006, 11:59 AM
Sorry for the ignorant question, what do I put in a batch file to shut down windows, right away? (Want to use it with speedfan so if my pump stops it shutsdown).

Kobalt
10-07-2006, 12:09 PM
shutdown.exe -s -t 0

(not sure if the -t 0) is needed. "-r" restarts btw.

You also might want to set it to automatically kill apps and services with a 0 second time out so it ends up shuting down...its in the registry.

Shpoon
10-07-2006, 12:19 PM
shutdown.exe -s -t 0

(not sure if the -t 0) is needed. "-r" restarts btw.

You also might want to set it to automatically kill apps and services with a 0 second time out so it ends up shuting down...its in the registry.

So that's all I type in? What do the flags do? And where is this in the registry :confused:

Kobalt
10-07-2006, 02:40 PM
So that's all I type in? What do the flags do? And where is this in the registry :confused:
Well i know if you go in command prompt and just type "shutdown.exe -s" it shutsdown. The flags I know are:
-s = Shutdown
-r = Restart
-t = time where # is in seconds (ex -t 60 = 60 second delay)
-c = Allows to display a message if there is a time delay. Example -c "The computer is shuting down" will display whatever is in quotes
-f = Forces applications to shutdown without warning

There are others...those are the main ones. To see them all type "shutdown.exe help" in cmd prompt.

spastikman
10-08-2006, 10:33 AM
don't forget to use -f (to force shutdown/restart).

Okda
10-08-2006, 10:46 AM
well i use the option in my mobo which will shutdown the system as asoon as my cpu reach 60C

Sorrow13
10-08-2006, 11:17 AM
also, if you dont put in the '0' after t, it defaults to 30 seconds.

shutdown -t 0 -f

Kobalt
10-08-2006, 12:11 PM
also, if you dont put in the '0' after t, it defaults to 30 seconds.

shutdown -t 0 -f
you need the .exe after shutdown

Sorrow13
10-08-2006, 01:23 PM
not from command line you dont. its a system function, so you dont need the extension.

bazx
10-08-2006, 01:35 PM
here is one i use @ lan partys shut down any comp on the lan:D


shutdown -r -f -m \\computorname -t 60 -c "you die" -d up:125:1

elec999
10-20-2006, 12:07 AM
How do you set the time to shutdown.
Thanks

XSAlliN
10-20-2006, 09:00 AM
Try setting this from BIOS - you should find that option there ;)

dig412
10-20-2006, 12:39 PM
here is one i use @ lan partys shut down any comp on the lan


shutdown -r -f -m \\computorname -t 60 -c "you die" -d up:125:1

Very sneaky :P