快速切换公司双线网络的批处理文件

#电信网络

@echo off
netsh interface ipv4 set address "本地连接" static 192.168.20.80 255.255.255.0 192.168.20.253
netsh interface ipv4 set dns "本地连接" static 114.114.114.114 primary
netsh interface ipv4 add dns "本地连接" 218.30.19.40 index=2
ipconfig
#pause

 

#网通网络
@echo off
netsh interface ipv4 set address "本地连接" static 192.168.20.80 255.255.255.0 192.168.20.254
ipconfig
#pause

请保存为.bat格式的文件

如果系统不是以管理员登录、点击右键用管理员身份运行.bat文件

posted @ 2012-12-13 17:24  Tomson Qiang  阅读(220)  评论(0编辑  收藏  举报