Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: How to check whether the server is up in VBScript

HTVi
TV Discussion Newsgroups

How to check whether the server is up in VBScript
Jerry 4/18/2007 7:16:02 AM
Please do tell me how to check whther the url or the webserver is up and
running using VBScript

Thanks,
Jerry
Re: How to check whether the server is up in VBScript
"Marty List" <usenet[ at ]optimumx.com> 4/19/2007 2:13:56 AM


Here's a quick example of how to retrieve a URL from VBScript. Run it from
a command prompt using a command similar to this:

CScript.exe filepath\scriptname.vbs http://www.domain.com/


''''''''''''''''''''''''''''''
Option Explicit

Dim objSvrHTTP

Set objSvrHTTP = CreateObject("Msxml2.XMLHTTP.4.0")
objSvrHTTP.open "GET", WScript.Arguments(0), False

'On Error Resume Next
objSvrHTTP.send
If Err.Number = 0 Then
WScript.Echo objSvrHTTP.responseText
Else
WScript.Echo "Error: " & Hex(Err.Number)
End If
''''''''''''''''''''''''''''''



"Jerry" <Jerry[ at ]discussions.microsoft.com> wrote in message
news:967488D3-DC3F-48DB-91F0-D84D401FD8FC[ at ]microsoft.com...
[Quoted Text]
> Please do tell me how to check whther the url or the webserver is up and
> running using VBScript
>
> Thanks,
> Jerry

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen