Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retreive IP from tracert and action of certain IP exists

Status
Not open for further replies.

utilman

IS-IT--Management
Dec 25, 2002
35
NL
Wat I would like to do is retreive IP's from a tracert command, and if a certain IP exists in all IP's change the desktop color. We have 3 exact the same virtual server networks, only difference is a certain interconnect IP on a extra firewall (source ip on firewall). IP is pingable from alle 3 lan's so I have to do this via a tracert.

Should be possible, but cannot make a start...

Can someone help me out to get on the right way?

Thanks
 
look at WshShell.Exec and reading standard output
 
So line code below, only than with a tracert command.
Does anyone know how?


strTarget = "192.168.1.1" 'IP address or hostname


Set WshShell = CreateObject("WScript.Shell")
PINGFlag = Not CBool(WshShell.run("ping -n 1 " & strTarget,0,True))
If PINGFlag = True Then
MsgBox "Successful ping"
Else
MsgBox "Unsuccessful ping"
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top