Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I force a shutdown script to run?

Status
Not open for further replies.

murphypa

Programmer
Mar 15, 2003
7
US
Does anybody know how I can force a shutdown script to run when remotely shutting down a server? I have tried a few different versions of shutdown.exe. They boot the server, but don't run the shutdown script. If I connect with the terminal server client and hit start/shutdown, it runs the script, but I have a huge infrastructure to reboot (sometimes), and I have to script it.

Any help would be appreciated.

Thanks.
-Paul
 
The Win2K Resource Kit has a remote command utility called RCMD.EXE as well as the shutdown.exe. It will launch commands remotely.

You can simply make yourself a batch file that you can run:

#Beginning of R.BAT

ECHO *** Beginning Shutdown Sequence ***
RCMD \\DC1 logscript.bat
SHUTDOWN \\DC1 /t:10 /r

#End of R.BAT

It might not be the perfect solution, but the result is what you want.




"In space, nobody can hear you click..."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top