Wednesday, May 23, 2007

shutdown pc from dos prompt

DOS shutdown commands with fun attachments.

Ok as you know by now when you reach a DOS Prompt you type:

shutdown -s [to shutdown]
shutdown -r [to restart]

Now how about adding a little flavor to them. Especially Windows XP users:

the switches:

-c [allows you to type a comment inside quotation marks that will be shown on screen during the shut down process] ex:

-c "your text here"

-t [this switch allows you to se a time in seconds til the shutdown occurs]ex:

-t 15
-t 84

the first one sets the timer at 15 seconds
the second one sets the timer at 84 seconds
so if you type the following into the command line:

shutdown -r -c "Your computer is now restarting" -t 12


this command creates the following situation:

Restarts the computer:
While displaying a neat dialogue box, with a countdown showing, and showing the message ::: your computer is now restarting :::


There are many other switches as well. Say you don't want to shutdown or restart, you just want to logoff.
type this switch:

logoff.exe

and you logoff.
I'm am still searching for the switch for Switch User though

Hope you like this information. It also works inside of batch files as well.


PS: Most all DOS commands work in EVERY DOS invironment. There are very few changes. But yes these commands for the most part also work in 98SE.

On another point. There are many that were not built into the 95 or earlier editions of windows though.

For a fairly complete list of common DOS switches in XP:

Open your CMD/DOS/Command Prompt and type the switch

/?

This is also helpful for finding alternate uses for specific switches: like say you need help with the delete command switch.
type:

delete /?

this will list all of the optional switch addons available for the delete command.

No comments: