Most Windows NT and Windows 2000 servers running IIS, have remote registry access disabled,
for security reasons. This prevents you from using NETSVC to check the status of
W3SVC (World Wide Web Publishing Service).
Using the open.exe freeware (or netcat), you can use the following technique to determine if the W3SVC service is running:
:loop sleep 180 REM Determine if you can access the site if not exist \\ComputerName\c$\boot.ini goto commprob for /f "Tokens=1 Delims=/ " %%i in ('@echo get^|open.exe www.jsiinc.com 80^|findstr /b /c:HTTP') do set state=%%i if "%state%" EQU "HTTP" goto loop REM Service is down
0 comments
Hide comments