Using only built-in functionality, use the following line to set the IP environment variable: for /f "skip=1 Tokens=2 Delims=[]" %%i in ('ping -n 1 %computername%') do set ip=%%i or for /f "tokens=2 delims=: " %%a in ('nslookup %computername%') do set ip=%%a |
|