@echo off
echo 修改IP地址
set nic=本地连接 %填入网卡名称%
set addip=10.1.6.200 %填入IP%
set addmask=255.255.255.0 %填入子网掩码%
set addgateway=10.1.6.1 %填入网关%
set adddns1=141.176.1.7 %填入首选DNS%
set adddns2= %填入首选DNS%
echo ------------------------------------------------------
echo 正在设置ip,请稍等几秒....
netsh interface ip set address name=%nic% source=static addr=%addip% mask=%addmask% gateway=%addgateway%
netsh interface ip set dns name=%nic% source=static addr=%adddns1% register=primary
netsh interface ip add dns name=%nic% addr=%adddns2%
echo 修改IP成功,请按任意键返回!
echo ------------------------------------------------------
pause >nul