Windows中使用BAT文件设置网络地址
@echo off
echo 正在设置ip,子网,请稍候......
netsh interface ip set address name="本地连接" source=static addr=192.168.1.102 mask=255.255.255.0 gateway=192.168.1.1 gwmetric=0
echo.
echo 正在设置DNS,请稍候.....
netsh interface ip set dns name="本地连接" source=static 202.106.195.68
netsh interface ip add dns name="本地连接" 202.106.46.151 index=2
echo 设置完毕!