| |
token
Posts: 1917
Score: 0
Joined: 1/14/2005
From:
Status: offline
|
You can do something like this: ====================================================================================== host = "google.com" Set wmi = GetObject("winmgmts:\\.\root\cimv2") Set exec = wmi.ExecQuery("Select * from Win32_PingStatus Where Address='" & host & "'") For Each item in exec If item.StatusCode = 0 Then WScript.echo "Connected" Else wscript.echo "Disonnected" End If Next
|
|