Skip navigation

JSI Tip 3575. Checking the status of your remote Web server.


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


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish