Question:
How can I ping a device that is external to the network running the application?
Solution:
To do so, you can use VBScripts commands.
For example:
dim oShell, strComputer
set oShell = CreateObject(“WScript.Shell”)
strComputer = InputBox(“Type the IP address you want to ping:”, “Ping”)
if strComputer <> “” then
‘ Ping Command options: timeout = 200 ms; number of echo requests = 1
if oShell.Run(“ping ” & strComputer & ” -w 200 -n 1″, 0, true) = 0 then
MsgBox strComputer & ” responded to ping.”, 0, “Ping OK”
else
MsgBox strComputer & ” did not respond to ping”, 0, “Ping Fail”
end if
end if
NOTE: Attached is a sample application developed with E3 version 3.1 Build 270.