Tech Notes
Tech Notes |
BAT file to keep IIS running
The following DOS BAT file keeps Microsoft Internet Information Server (IIS) running by repeatedly trying to restart it. Note that when IIS crashes, it also crashes the FTP server so you need to restart that as well.
Tip: turn off the visual display of Dr. Watson error messages. Otherwise that dialog box will be on the screen waiting for [Ok] and this .bat file will not be too effective! The setting is in the registry under software\Microsoft\DrWatson.
rem iis-on.bat echo off rem use any log file set a=d:\log\iiscrash.log cd %0\.. :loop net start w3svc if errorlevel 1 goto wait rem rem There is an error when the service was already working! rem If we get here, the service was restarted. rem Log the date, time and blank line echo.|date >> %a% echo.|time >> %a% echo. >>%a% REM FTP net start "FTP Publishing service" rem Wait is a utility function from HREF Tools. :wait wait 15 cls goto loop
Copyright © 1995-2010 HREF Tools Corp. All Rights Reserved Worldwide. 12-May-1998.
Running DynHelp.exe v1.2.0.6 on WebHub-v2.125 built by D14
Calc time: 109 ms
Running DynHelp.exe v1.2.0.6 on WebHub-v2.125 built by D14
Calc time: 109 ms

