mugabemkomo
Goto Top

IP aus Ping Abfrage auslesen

hallo, ich suche eigentlich nur einen weg per batch datei aus ping <domain> die ip auszulesen, damit ich die ip über ein anderes interface routen kann.
also quasi bisher mach ich zb. ping heise.de, ip notieren und route add %ip% mask........

danke schonmal

Content-ID: 56416

Url: https://administrator.de/forum/ip-aus-ping-abfrage-auslesen-56416.html

Ausgedruckt am: 20.02.2025 um 01:02 Uhr

Logan000
Logan000 12.04.2007 um 08:22:12 Uhr
Goto Top
Versuch mal dies vbs skript.

Set WSHShell = WScript.CreateObject("WScript.Shell")
set MyFiles = CreateObject("Scripting.FileSystemObject")
Set oExec = WshShell.Exec("Ping srv1 -n 1 " )
Do While Not oExec.StdOut.AtEndOfStream
input = input & oExec.StdOut.Read(1)
Loop
PingTest = "! Ping an SRV1 (1. DC) NICHT Erfolgreich"
If InStr(input, "TTL=" ) <> 0 Then
PingTest"Ping an SRV1 (1. DC) Erfolgreich"
End If
msgBox pingTest
miniversum
miniversum 12.04.2007 um 08:28:10 Uhr
Goto Top
oder als Batch:
@for /F "tokens=2 delims=][" %%i in ('ping www.heise.de') do @echo %%i

miniversum
mugabemkomo
mugabemkomo 12.04.2007 um 08:44:54 Uhr
Goto Top
opti flopti, geht danke ^^