切换家里和公司网络的脚本
2011-03-08 13:36
148 查看
@echo off
echo (1).家庭网络
echo (2).办公网络
echo (3).退出
set /p x= 选择你要设置的网络:
if %x%==1 goto a
if %x%==2 goto b
if %x%==3 goto c
:a
netsh interface ip set address "本地连接" static 192.168.0.254 255.255.255.0 192.168.0.1 1
netsh interface ip set dns "本地连接" static 8.8.8.8
netsh interface ip add dns "本地连接" 8.8.4.4
echo 开始清楚IE代理设置
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "168.1.255.251:80" /f
exit
:b
netsh interface ip set address "本地连接" static 168.1.110.210 255.255.255.0 168.1.110.254 1
netsh interface ip set dns "本地连接" static 168.1.255.251
echo 开始设置IE代理上网
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "168.1.255.251:80" /f
exit
:c exit
保存为 切换ip.bat,双击执行即可.
echo (1).家庭网络
echo (2).办公网络
echo (3).退出
set /p x= 选择你要设置的网络:
if %x%==1 goto a
if %x%==2 goto b
if %x%==3 goto c
:a
netsh interface ip set address "本地连接" static 192.168.0.254 255.255.255.0 192.168.0.1 1
netsh interface ip set dns "本地连接" static 8.8.8.8
netsh interface ip add dns "本地连接" 8.8.4.4
echo 开始清楚IE代理设置
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "168.1.255.251:80" /f
exit
:b
netsh interface ip set address "本地连接" static 168.1.110.210 255.255.255.0 168.1.110.254 1
netsh interface ip set dns "本地连接" static 168.1.255.251
echo 开始设置IE代理上网
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "168.1.255.251:80" /f
exit
:c exit
保存为 切换ip.bat,双击执行即可.
相关文章推荐
- 切换网络连接的脚本
- 最近公司需要监测网络PING写了一个脚本
- linux脚本检查公司网络是否正常
- wifi eth gprs 网络自动切换 脚本
- 快速切换公司双线网络的批处理文件
- 切换网络连接的脚本
- PC网络配置切换脚本(IP地址切换脚本)
- 【转】VBS脚本 实现"无线网络连接"与"本地连接"的网卡禁用启用完美切换(优化版)
- Mac os x 终端设置IP DNS 相关命令 办公室、家里网络切换
- 不同网络环境下快速切换IP脚本(Windows版)
- 写一个快速切换网络的BAT脚本
- 自动切换网络访问脚本(不完全版)
- 网络打印机安装脚本(rundll32 printui.dll,PrintUIEntry用法示例)
- 一个小公司的网络解决方案
- 网络连接评分机制之再谈WIFI与数据切换过程
- 没有老板的公司,你适应吗?-摘自网络
- 网络诈骗侦查公司41st Parameter获1300万美元投资 Kleiner Perkins参投
- 用脚本检测局域网络是否可以ping通
- 登入脚本统一公司桌面