Shutdown.exe

For beginners, flames not allowed...(just by the staff :P)
Post Reply
lightcrowler
On the way to fame!
On the way to fame!
Posts: 37
Joined: 26 Feb 2008, 17:00
16
Contact:

Shutdown.exe

Post by lightcrowler »

It's a simple way to create a .exe file to shutdown you computer immediatelly.

Right click mouse,new and shortcut.

Now add %windir%\system32\shutdown.exe -s -t 0

Write some name for the .exe file,let's say shutdown.
Now a .exe file is created with the name shutdown.
Just click on that icon and youre computer will shutdown in a moment.
But now my question is:?
Can someone explain me what the last -s -t 0 stand for??
I mean without these 3 the computer want turn off?

User avatar
Gogeta70
^_^
^_^
Posts: 3275
Joined: 25 Jun 2005, 16:00
18

Post by Gogeta70 »

In the windows command prompt, if you type "shutdown /?" it gives you a list of options:

Code: Select all

C:\Documents and Settings\Gogeta70>shutdown /?
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "comment"] [-d up:xx:yy]

        No args                 Display this message (same as -?)
        -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)

¯\_(ツ)_/¯ It works on my machine...

lightcrowler
On the way to fame!
On the way to fame!
Posts: 37
Joined: 26 Feb 2008, 17:00
16
Contact:

Post by lightcrowler »

Thx for the great explanation.
It's so simple,but so usefull :)

Post Reply