经常在公司和家两地用笔记本上网的人经常会遇到这样的麻烦 公司和家里用的不是一个IP 和DNS 每次手动更改都很麻烦
@echo off
title IP地址、网关、DNS自动设置程序
echo 正在更改IP 请稍后...
netsh interface ip set address 本地连接 static 192.168.3.152 255.255.255.0 192.168.3.1 default
echo 正在更改DNS
netsh int ip add dns name="本地连接" addr=202.98.0.68 index=1
netsh int ip add dns name="本地连接" addr=202.98.5.68 index=2
exit
更改IP 后面的default 必须加