您的位置:首页 > 其它

每次手动改IP很烦躁,写个Windows下自动改IP设置的小脚本

2010-07-07 15:52 585 查看
cuc的实验室很2,居然没有dhcp,家里是dhcp。每天改来改去改得手痛。

到实验室了运行一下cuc.cmd:

netsh interface ipv4 set address name="本地连接" source=static gateway=192.168.0.1 gwmetric=1 addr=192.168.1.3 mask=255.255.255.0
netsh interface ipv4 set dns name="本地连接" source=static addr=202.xx.xx.xxx

回家运行一下home.cmd:

netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp

注意:win7下右键管理员

参考:

http://www.2000trainers.com/windows-xp/change-ip-address-netsh/

netsh /?

netsh interface /?

netsh interface ip /?

netsh interface ip set /?

netsh interface ip set address /?

netsh interface ip set dns /?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: