@echo off
echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo 正在修改IP地址和DNS服务器地址...
netsh interface ip set address name="本地连接" source=static addr=10.0.1.1 mask=255.255.255.0
netsh interface ip set address name="本地连接" gateway=10.0.1.1 gwmetric=0
netsh interface ip set DNS "本地连接" source=static addr=10.0.1.1
netsh interface ip add dns "本地连接" 10.0.1.1 index=2
echo 检查当前本机配置...
ipconfig /all
echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo
保存成.bat文件,运行即可。IP地址和网关,DNS修改成自己需要的。