[解决办法]
for /f "tokens=*" %i in ('ipconfig /all^|find /i "ipv4" ') do set yourvar=%i
[解决办法]
for /f "tokens=2 delims=:(" %i in ('ipconfig /all^|find /i "ipv4" ') do set yourvar=%i
[解决办法]
for /f "delims=" %i in ( 'ipconfig /all ^| find /i "ipv4" ') do set yourvar=%i