Discussion Locked

Automate NT shutdown

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm trying to find out if there is a way to have batch files and perhaps some programs automatically executed if an NT/W2K server is shutdown. I'd like to avoid using 3rd party solutions if possible and am hoping this is achievable using NT/W2K registry config, some RK tool(s) or such like. Your input would be much appreciated.

5 replies

by syscokid

You could write a batch or script to run the stuff you want to run, then end the script with the shutdown utility available in the Resource Kit

shutdown /l /y

by vagab0nd

Use shutdown.exe from Resource Kit.
The syntax is following:

shutdown [\\computer] [/L] [/A] [/R] [/T:xx] ["Msg"] [/Y] [C]

\\computer - shutdowns remote computer
/L - local PC shutdown
/A - aborts shutdown. Works only in timeout period. All other switches ignored
/R - reboot after shutdown
/T:xx - timeout in sec, default is 20 sec
"Msg" - additional message
/Y - answers all following questions Yes
/C - forces all apps to close. Be careful with this switch as you won't see any promt for saving, it will just close all the apps

This discussion is closed to new replies.