Function IsPingable(vServer) 'This function will return TRUE or FALSE after pinging a server and 'checking it's response. 'This script is provided under the Creative Commons liscense located 'at http://creativecommons.org/licenses/by-nc/2.5/ . It may not 'be used for comercial purposes with out the expressed written consent 'of NateRice.com On Error Resume Next Const OpenAsDefault = -2 Const FailIfNotExist = 0 Const ForReading = 1 Set oShell = CreateObject("WScript.Shell") Set oFSO = CreateObject("Scripting.FileSystemObject") sTemp = oShell.ExpandEnvironmentStrings("%TEMP%") sTempFile = sTemp & "\runresult.tmp" oShell.Run "%comspec% /c ping -n 2 " & vServer & ">" & sTempFile, 0, True Set fFile = oFSO.OpenTextFile(sTempFile, ForReading, FailIfNotExist, _ OpenAsDefault) sResults = fFile.ReadAll fFile.Close oFSO.DeleteFile (sTempFile) IsPingable = (InStr(sResults, "TTL=") > 0) Set oShell = Nothing Set oFSO = Nothing End Function