当机器有两块网卡的时候比如
Windows 2000 IP Configuration
Ethernet adapter 本地连接 2:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.29
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.29
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.254
当用以下批处理时
@echo off
for /f "tokens=15" %%i in ('ipconfig ^| find /i "IP Address"') do set ip=%%i
echo %ip%
pause
取到的值时192.168.0.29,如果想取第一个IP192.168.1.29,应该怎么修改
Windows 2000 IP Configuration
Ethernet adapter 本地连接 2:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.1.29
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.0.29
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.254
当用以下批处理时
@echo off
for /f "tokens=15" %%i in ('ipconfig ^| find /i "IP Address"') do set ip=%%i
echo %ip%
pause
取到的值时192.168.0.29,如果想取第一个IP192.168.1.29,应该怎么修改
