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>nulI 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=%%aSO HOW
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
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |