Shutdown PC with extended options

Posted in Windows XP by Community Submission

This tweak explains alternative ways of shutting down your PC and more options for shutting down.

To shut down your computer from the command line, type "shutdown -s". This could be used in a batch file, for example. However, this does not shut down immediately - it gives a 30 second countdown. To see further options for the shutdown command, type "shutdown" at the command prompt and it will show you a list of options. You can even shut down another PC remotely! Logoff and restart are other options.

Here are some of the other flags you can use along with the another ussage example:

Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]

-i Display GUI interface, must be the first option

-l Log off (cannot be used with -m option)

-s Shutdown the computer

-r Shutdown and restart the computer

-a Abort a system shutdown

-m \\computername Remote computer to shutdown/restart/abort

-t xx Set timeout for shutdown to xx seconds

-c "comment" Shutdown comment (maximum of 127 characters)

-f Forces running applications to close without warning

-d [u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer less than 256)
yy is the minor reason code (positive integer less than 65536)

Free Computer Magazines and eBooks
Comments