You can use WMI (add referrence/import to system.management)
Dim objPing As New SelectQuery("SELECT StatusCode FROM Win32_PingStatus
where address='" & machinename_or_ipaddress & "'")
Dim objSearch as New ManagementObjectSearcher(objPing)
Dim PingStatus As String = ""
For Each objItem as In objSearch.Get()
PingStatus = objItem("StatusCode").ToString
Next
if PingStatus <> "0" Then
' failed
else
'success
end if
\\\
Dim p As New Process
Dim pi As New ProcessStartInfo
pi.UseShellExecute = False
pi.RedirectStandardOutput = True
pi.Arguments = "www.google.com"
pi.WorkingDirectory = "C:\windows\system32"
'this for nt* computers
pi.FileName = "ping"
p.StartInfo = pi
p.StartInfo = pi
p.Start()
Dim sr As IO.StreamReader = p.StandardOutput
Dim sb As New System.Text.StringBuilder("")
Dim input As Integer = sr.Read
Do Until input = -1
sb.Append(ChrW(input))
input = sr.Read
Loop
MessageBox.Show(sb.ToString)
///