单位有2个网络,为了工作方便,单位IT工程师给我们针对2个不同的网络分别做了2个BAT文件,很是好用,又需要的看看吧?

第一个,代码如下,在记事本里编辑,以后缀名bat保存即可:

echo off
netsh interface ip set address "本地连接" static 172.16.168.232 255.255.0.0 172.16.168.1 1
netsh interface ip set dns "本地连接" static 172.16.193.14
@echo             --------------------已切换为外文局网络--------------------
pause

第二个,代码如下,在记事本里编辑,以后缀名bat保存即可:

echo off
netsh interface ip set address "本地连接" static 192.168.2.50 255.255.255.0 192.168.2.1 1
netsh interface ip set dns "本地连接" static 192.168.2.1
@echo             --------------------已切换为新星网络--------------------
pause

posted on 2008-12-09 17:28  yhb199  阅读(1046)  评论(0编辑  收藏  举报