Tuesday, July 22, 2008

Shut down Windows XP from the command line

You can use following built-in utility to shutdown Windows and then the machine itself:
C:\WINDOWS\SYSTEM32\TSSHUTDN.EXE 0 /POWERDOWN /DELAY:secs

To reboot use the following option:

C:\WINDOWS\SYSTEM32\TSSHUTDN.EXE 0 /REBOOT /DELAY:secs

To see a list of command options type tsshutdn /?

DELAY is in seconds.

  • 30 minutes = 1800 seconds
  • 1 hour = 3600 seconds
  • 2 hours = 7200 seconds
  • 3 hours = 10800 seconds

No comments: