View Single Post
  #10  
Old 03-12-2019, 09:59 AM
berdmann berdmann is offline
VanDyke Technical Support
 
Join Date: Aug 2017
Posts: 441
Hi GuitarDude,

You can run a script in SecureCRT to get the IP address using crt.Session.RemoteAddress and then launch CMD to do the ping.

Here is a general example:

Code:
strTarget = crt.Session.RemoteAddress

Set objShell = CreateObject("WScript.Shell")
Set objExec = objShell.Exec("ping -n 2 -w 1000 " & strTarget)
strPingResults = LCase(objExec.StdOut.ReadAll)
myResponse = msgbox("Ping Results: " & vbcr & vblf & strPingResults)
As you can see, the only thing that is really specific to SecureCRT's scripting API is crt.Session.RemoteAddress. The rest of what you would like to do falls outside of SecureCRT.

We were not able to find a way to get CMD to display the ping results real time.
__________________
Thanks,
--Brittney

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730