WBURKERT
Technical User
- May 28, 2010
- 73
The kine below does not execute and may be causing my macro from running. paping.exe works without a problem from a command prompt.
This line executes and is similar to what I am trying to accomplish with paping.
Code:
boolCode = objShell.Run("paping " & strWKB, 0, True)
Code:
'boolCode = objShell.Run("Ping -n 1 -w 6000 " & strComputer, 0, True)
Code:
unction GetPingInfo(strComputer)
Dim objShell, boolCode
Set objShell = CreateObject("WScript.Shell")
'paping [URL unfurl="true"]www.google.com[/URL] -p 80 -c 4
strPortNum = "8004"
'Checking program is not crashing here, that's all
MsgBox "strPortNum: value is " & strPortNum & vbCrLf, vbInformation
strWKB = strComputer & " -p " & strPortNum & " -c 1 -t 5000"
'Checking program is not crashing here, that's all
MsgBox "strWKB: value is " & strWKB & vbCrLf, vbInformation
'START paping routine
boolCode = objShell.Run("paping " & strWKB, 0, True)
MsgBox "boolCode: value is " & boolCode & vbCrLf, vbInformation
'START ping routine
'boolCode = objShell.Run("Ping -n 1 -w 6000 " & strComputer, 0, True)
'MsgBox "boolCode: value is " & boolCode & vbCrLf, vbInformation
If boolCode = 0 Then
GetPingInfo = "Successful Reply"
Else
GetPingInfo = "Failure"
End If
End Function