netsh命令批处理修改IP地址

April 8th, 2007  | Categories: 系统_OS  | Tags: ,

每次在寝室和办公室之间更改IP是个很麻烦的事情。

使用这个批处理就方便了。

首先假设现在已经在网络链接里手动配置了IP地址。

Win+R(运行)
CMD
netsh -c interface ip dump > C:\ipaddress.txt

用UE编辑C:\ipaddress.txt

1. 替换所有set为netsh interface ip set
2. add dns替换为netsh interface ip add dns
3. 删掉带有#的行
4. 文件另存为officeip.bat

运行即可设置IP,免得每次都手动改。

同理建立另外一个dormip.bat。

很是方便。

Top