Batch find remote ip

May 8, 2012 at 08:12:48
Specs: Windows 7
Hello Im trying to make a batch file that can find lan ip and remote ip
AS i know lan ip is this
ipconfig | findstr IPv4 > TEMPIP.txt
FOR /F "tokens=2 delims=:" %%a in (TEMPIP.txt) do set IP=%%a
del TEMPIP.txt
set IP=%IP:~1%
Echo &ip&
pause>nul

I can get lan ip but i cant get remote ip
I have the codes that gives me remote ip in cmd but i cant get the ip between " and "

here are the codes

1)WMIC NICCONFIG Get IPAddress
2)NSLOOKUP
(Im trying to use this):
WMIC NICCONFIG Get IPAddress | findstr IPv4 > TEMPIP2.txt
FOR /F "tokens=2 delims="" %%a in (TEMPIP2.txt) do set IP2=%%a

SO HOW


See More: Batch find remote ip

Report •


#1
June 3, 2012 at 10:25:18
looks like this has been sitting for a while, perhaps.

http://serverfault.com/questions/48...

about halfway down they talk about remote ips and aquireing.

:: mike


Report •
Related Solutions


Ask Question