Staticfactory
IS-IT--Management
I'm using this function to ping machines before trying to connect to them for various reporting...
I'm aware that this is limited to Windows 2003 and XP networks, but a machine running W2k3/XP should be able to ping anything with an ip using this function right? I can't see why a Windows 98 machine, for example, would not reply to the ping this function is creating.
Code:
Function ping(hostname)
set wshShell = CreateObject("WScript.Shell")
ping = Not CBool(wshShell.run("ping -n 1 " & hostname,0,True))
End Function
I'm aware that this is limited to Windows 2003 and XP networks, but a machine running W2k3/XP should be able to ping anything with an ip using this function right? I can't see why a Windows 98 machine, for example, would not reply to the ping this function is creating.