获取适配器名
::这里填适配器名
set NET_NAME="demo"
::静态IP
set NET_IP="192.168.1.109"
::子网掩码
set NET_MASK="255.255.255.0"
::默认网关
set NET_GATE="192.168.1.1"
::首选DNS服务器
set DNS_FIRST="119.29.29.29"
::备选DNS服务器
SET DNS_SECOND="202.96.134.133"
netsh interface ip set dnsservers %NET_NAME% static %DNS_FIRST% primary no
netsh interface ip add dnsservers %NET_NAME% %DNS_SECOND% index=2 no