效果图片:
代码:
echo start---
netsh interface ip set address name="本地连接" source = static addr = 172.16.58.102 mask=255.255.255.0
netsh interface ip set address name="本地连接" gateway = 172.16.58.253 gwmetric =0
netsh interface ip set dns name="本地连接" source = static addr = 192.168.2.17 register=PRIMARY
netsh interface ip add dns name="本地连接" addr = 192.168.0.3 index=2
echo end---
pause
保存其内容为.bat格式即可。