'******************************************************************** '* Function IsPingable(strHost) '* '* Returns True or False based on the output from ping.exe '******************************************************************** Function IsPingable(strHost) Set objShell = WScript.CreateObject("WScript.Shell") Set objExecObject = objShell.Exec("cmd /c ping.exe -n 3 -w 1000 " & strHost) Do While Not objExecObject.StdOut.AtEndOfStream strText = objExecObject.StdOut.ReadLine() If Instr(strText, "Reply") > 0 Then 'Wscript.Echo "Reply received." IsPingable = True Exit Do End If Loop If (IsPingable <> True) Then IsPingable = False End If End Function