每次手动改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 /?
到实验室了运行一下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 /?
相关文章推荐
- Windows 下 自动 设置IP 的 批处理脚本
- 更改IP 脚本(自动获取和手动设置多个IP),将内容拷贝到记事本另存为bat批处理文件
- win7 更改IP 脚本(自动获取和手动设置多个IP),将里面内容拷贝到记事本另存为set_win7_IP.bat
- 使用Python脚本自动修改Windows的IP、网关和DNS设置
- 【转】windows上自动设置java环境变量的脚本
- 使用脚本自动修改ip设置
- 自动设置ip的dns的window脚本
- windows上自动设置java环境变量的脚本
- windows下设置计划任务自动执行PHP脚本
- 【转载】 IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法
- windows上自动设置java环境变量的脚本
- windows下设置ip的脚本
- Windows 自动获取IP脚本
- windows 设置脚本IP
- linux服务器网络配置_自动获取ip_手动设置静态ip
- IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法
- windows脚本设置网络IP地址
- windows下设置计划任务自动执行PHP脚本
- 设置IP和代理的Windows Bat脚本
- 设置WLAN的IP和DNS为自动获取失败,在DOS下手动修改