@echo off
call :select "ip address" "ip"
call :select "physical address" "mac"
call :select "default gateway" "gateway"
call :select "dns servers" "dns"
call :select "description" "netcard"
echo IP:%ip%
echo MAC:%mac%
echo DNS:%dns%
echo GATEWAY:%gateway%
echo NETCARD:%netcard%
pause>nul
goto :eof
:select
for /f "tokens=2 delims=:" %%i in ('ipconfig /all ^| findstr /i /c:%1') do set "%~2=%%i"
goto :eof