Shutdown Command (1 Viewer)

ajetrumpet

Banned
Local time
Today, 08:29
Joined
Jun 22, 2007
Messages
5,638
I can't seem to figure out how (or IF I can) to use more than one switch with the shutdown command in Vista. Am I barking up the wrong tree here? All I want to do is shutdown the local machine, issue a restart, but set the timeout to 0 seconds. By default it is something like 30 seconds. Using the command with the /s switch issues a warning message, and the command has to be aborted using the /a switch if I don't want to wait a minute for the shutdown. Does anyone know if I can combine two switches here? I want this:
Code:
shutdown/p/r
This only displays the help screen like what you see in the JPEG. Any help?
 

Attachments

  • dos.jpg
    dos.jpg
    102.5 KB · Views: 243
Local time
Today, 08:29
Joined
Mar 4, 2008
Messages
3,856
Why do you need both /p and /r? Doesn't /r restart the computer immediately?

But, yes, from what I can tell, you can send multiple switches to shutdown. You may need a space to "delimit" the switches, though.

It may be that you need to tell it "which" computer to restart.

I was unaware there was any such command in Windoze. I fear this may not be for home users but I'll experiment a little after I post (since I'm likely to reboot).

Usage: shutdown [/i | /l | /s | /r | /g | /a | /p | /h | /e] [/f]
[/m \\computer][/t xxx][/d [p|u:]xx:yy [/c "comment"]]
No args Display help. This is the same as typing /?.
/? Display help. This is the same as not typing any options.
/i Display the graphical user interface (GUI).
This must be the first option.
/l Log off. This cannot be used with /m or /d options.
/s Shutdown the computer.
/r Shutdown and restart the computer.
/g Shutdown and restart the computer. After the system is
rebooted, restart any registered applications.
/a Abort a system shutdown.
This can only be used during the time-out period.
/p Turn off the local computer with no time-out or warning.
Can be used with /d and /f options.
/h Hibernate the local computer.
Can be used with the /f option.
/e Document the reason for an unexpected shutdown of a computer.
/m \\computer Specify the target computer.
/t xxx Set the time-out period before shutdown to xxx seconds.
The valid range is 0-600, with a default of 30.
Using /t xxx implies the /f option.
/c "comment" Comment on the reason for the restart or shutdown.
Maximum of 512 characters allowed.
/f Force running applications to close without forewarning users.
/f is automatically set when used in conjunction with /t xxx.
/d [p|u:]xx:yy Provide the reason for the restart or shutdown.
p indicates that the restart or shutdown is planned.
u indicates that the reason is user defined.
if neither p nor u is specified the restart or shutdown is unpl
anned.
 
Local time
Today, 08:29
Joined
Mar 4, 2008
Messages
3,856
Here we go:
Code:
shutdown /r /t 0

I only had to reboot 3 times to figure it out.
 

Banana

split with a cherry atop.
Local time
Today, 06:29
Joined
Sep 1, 2005
Messages
6,318
How odd. I could have sworn that Windows didn't necessitate timer to shut down as *nix does... Few months I needed to shutdown a computer remotely and dug everywhere but never saw (or missed) the fact that shutdown command behaves just exactly like in *nix...
 

sidharth

Registered User.
Local time
Today, 06:29
Joined
Jan 19, 2009
Messages
19
I can't seem to figure out how (or IF I can) to use more than one switch with the shutdown command in Vista. Am I barking up the wrong tree here? All I want to do is shutdown the local machine, issue a restart, but set the timeout to 0 seconds. By default it is something like 30 seconds. Using the command with the /s switch issues a warning message, and the command has to be aborted using the /a switch if I don't want to wait a minute for the shutdown. Does anyone know if I can combine two switches here? I want this:
Code:
shutdown/p/r
This only displays the help screen like what you see in the JPEG. Any help?

sorry ajetrumpet but I really heard it first time.
 

Users who are viewing this thread

Top Bottom