The Windows NT Resource Kit has a handy utility called kill.exe
which is better than net stop... if the server crashes, net stop won't
work because the service won't respond. I use the following in a .cmd
file:
kill inetinfo.exe
kill mtx.exe
net start w3svc
What I'd love to find is a Perl script that runs as a service
using Win32::Daemon and can test the server, and if anything does
not respond, kill it without shell commands (can't do that as a
service!) and restart the server.
|