Reply
Old February 1st, 2008 Top | #1

OSNN Folding Team  
kcnychief's Avatar
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305

Default Supress Remote Shutdown Message

I'm trying to write a script that will run from a workstation, to shutdown a server remotely. It seems to not be working because there is a dialog that is waiting for an OK before proceeding. Here is the syntax:

shutdown -s -m \\server01

Here is the message waiting on the server (see attached)

How can I force this to occur without the dialog? I looked at the command line args and nothing is obvious?
Attached Thumbnails
Supress Remote Shutdown Message-shutdown.jpg  
kcnychief is offline   Reply With Quote
Old February 1st, 2008 Top | #2

OSNN Folding Team  
Dark Atheist's Avatar
OSNN Veteran Addict
Joined: April 2003
Location: In The Void
Posts: 6,373
Blog Entries: 9
Reputation: 1877
Power: 193

Default Re: Supress Remote Shutdown Message

/p ? /f ?
Dark Atheist is offline   Reply With Quote
Old February 1st, 2008 Top | #3
 
Shamus MacNoob's Avatar
OSNN Veteran Addict
Joined: January 2002
Location: Brossard,Quebec
Posts: 4,199
Blog Entries: 1
Reputation: 1481
Power: 182

Default Re: Supress Remote Shutdown Message

C:\Users\Don Carnage>shutdown /?
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.
xx is the major reason number (positive integer less than 256).
yy is the minor reason number (positive integer less than 65536).


Seems obvious that the /P is leaning towards what your looking for


ASUS PN5-E SLI,Intel E8400,2 x 8800GTX 768mb SLI,ASUS VW266H 26 inch LCD, 8 GB Crucial Ballistix Tracer, Silverstone Strider 850watt PSU.Windows 7 Ultimate 64bit.
Shamus MacNoob is offline   Reply With Quote
Old February 1st, 2008 Top | #4

OSNN Folding Team  
kcnychief's Avatar
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305

Default Re: Supress Remote Shutdown Message

I thought that, but that says local PC.

I am running this from another computer, so I have to use the /m switch which handles remote PCs and interpreted the /p as only working locally?

I'll give it a whirl, but not sure that would do what I'm looking for. Also hard to test without a timeout, I would like to have at least a few seconds so I can abort during my testing.
kcnychief is offline   Reply With Quote
Old February 1st, 2008 Top | #5
 
Shamus MacNoob's Avatar
OSNN Veteran Addict
Joined: January 2002
Location: Brossard,Quebec
Posts: 4,199
Blog Entries: 1
Reputation: 1481
Power: 182

Default Re: Supress Remote Shutdown Message

The parameter is after the local command , so it will apply to the target I am pretty sure..


ASUS PN5-E SLI,Intel E8400,2 x 8800GTX 768mb SLI,ASUS VW266H 26 inch LCD, 8 GB Crucial Ballistix Tracer, Silverstone Strider 850watt PSU.Windows 7 Ultimate 64bit.
Shamus MacNoob is offline   Reply With Quote
Old February 1st, 2008 Top | #6

OSNN Folding Team  
Dark Atheist's Avatar
OSNN Veteran Addict
Joined: April 2003
Location: In The Void
Posts: 6,373
Blog Entries: 9
Reputation: 1877
Power: 193

Default Re: Supress Remote Shutdown Message

Originally Posted by kcnychief View Post
I thought that, but that says local PC.

I am running this from another computer, so I have to use the /m switch which handles remote PCs and interpreted the /p as only working locally?

I'll give it a whirl, but not sure that would do what I'm looking for. Also hard to test without a timeout, I would like to have at least a few seconds so I can abort during my testing.
/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.

/f Force running applications to close without forewarning users.

Dark Atheist is offline   Reply With Quote
Old February 1st, 2008 Top | #7

OSNN Folding Team  
kcnychief's Avatar
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305

Default Re: Supress Remote Shutdown Message

I know about the /t, but the default without using the /t is 30 seconds which I'm fine with.

I did try with the /f option but it still presents the message I have to click OK on.

I'll give the /p a try later on tonight or this weekend and see if that does the trick.
kcnychief is offline   Reply With Quote
Old February 3rd, 2008 Top | #8

OSNN Folding Team  
kcnychief's Avatar
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305

Default Re: Supress Remote Shutdown Message

OK, well the /p does not work on its own, I need to use the /d switch a long with it.

Traveling to the site tomorrow as the /p doesn't provide a warning and I want to be able to abort or manually turn the system back on. It looks as if the combination of those will do the trick since the /d gives me the ability to provide a reason.

Stay tuned!
kcnychief is offline   Reply With Quote
Old February 4th, 2008 Top | #9

OSNN Folding Team  
Electronic Punk's Avatar
The Last High
Joined: December 2001
Location: London
Posts: 18,510
Blog Entries: 51
Reputation: 3652
Power: 349

Default Re: Supress Remote Shutdown Message

/t 1 and they won't know what hit em

There is a great tool called poweroff as well which will let you do it with a gui and then show you what the command would have been.

Electronic Punk is offline   Reply With Quote
Old February 5th, 2008 Top | #10

OSNN Folding Team  
kcnychief's Avatar
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305

Default Re: Supress Remote Shutdown Message

Maybe I'll throw a /t switch at the end - anyways this got postponed until tomorrow. Dang schedules!
kcnychief is offline   Reply With Quote
Old February 6th, 2008 Top | #11

OSNN Folding Team  
kcnychief's Avatar
█▄█ ▀█▄ █
Joined: April 2005
Location: Massachusetts
Posts: 16,949
Reputation: 4941
Power: 305

Default Re: Supress Remote Shutdown Message

****er! This still won't work, even tried disabling the logging of shutdown reasons.

Am going to just schedule the task for it to shut down, but that's lame!

I did look at poweroff, but can't get it to show the command I would need? Rubbish!
kcnychief is offline   Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pop up message dreamworks Windows Desktop Systems 1 May 13th, 2003 9:27am
Message sasa Windows Desktop Systems 2 March 22nd, 2003 7:02pm
message box adek Windows Desktop Systems 1 January 29th, 2003 2:53pm
help with message ElementalDragon Windows Desktop Systems 6 November 18th, 2002 1:13am
What is this error message? craigmack Windows Desktop Systems 2 August 17th, 2002 2:55pm