轻松切换IP及IE代理设置
2008-04-04 18:37
411 查看
用笔记本的朋友,常常面临者回家上班使用不同网络的情况。每每都需要进行切换。之前我一直使用一个IP切换工具。可是这些工具总是有问题。有的时候除了要切换IP地址,还要切换IE的设置。写了一个小批处理程序可以轻松解决这个问题。呵呵。
回到家里自动上网,到公司设置代理上网,只需要一个程序就可以自动设置完成。
建一个文本文件,修改扩展名为.bat
xip.bat
@echo off
color 1f
title 网络环境切换管理
echo.
echo *** 设置IP参数,设置IE代理 ***
echo.
echo.
goto menus~
:menus~
echo.
echo 请选择:
echo 1 切换到公司网
echo 2 切换到自动获取直接上网
echo.
set /p select=请输入菜单对应数字后回车:
if /i "%select%" == "1" goto neusoft
if /i "%select%" == "2" goto auto
goto menus~
:neusoft
cls
netsh interface ip reset "本地连接"
echo 设置IP...
netsh interface ip add address "本地连接" 192.168.20146 255.255.255.0
echo 设置网关...
netsh interface ip add address "本地连接" gateway=192.168.2.129 gwmetric=1
echo 设置DNS...
netsh interface ip set dns "本地连接" static 202.101.111.41 primary
del 本地连接
echo 设置IE代理...
@echo Windows Registry Editor Version 5.00>>r.reg
@echo [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings]>>r.reg
@echo "ProxyEnable"=dword:00000001>>r.reg
regedit /s r.reg
del r.reg
goto exit
:auto
cls
echo 设置IP...
netsh interface ip set address name="本地连接" source=dhcp
echo 设置DNS...
netsh interface ip set dns name="本地连接" source=dhcp
@echo Windows Registry Editor Version 5.00>>r.reg
@echo [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings]>>r.reg
@echo "ProxyEnable"=dword:00000000>>r.reg
regedit /s r.reg
del r.reg
goto exit
:exit
cls
echo.
cho.
echo.
echo.
echo.
echo 恭喜!已完成所有设置.
echo.
echo.
echo.
echo.
echo.
echo.
pause
exit
回到家里自动上网,到公司设置代理上网,只需要一个程序就可以自动设置完成。
建一个文本文件,修改扩展名为.bat
xip.bat
@echo off
color 1f
title 网络环境切换管理
echo.
echo *** 设置IP参数,设置IE代理 ***
echo.
echo.
goto menus~
:menus~
echo.
echo 请选择:
echo 1 切换到公司网
echo 2 切换到自动获取直接上网
echo.
set /p select=请输入菜单对应数字后回车:
if /i "%select%" == "1" goto neusoft
if /i "%select%" == "2" goto auto
goto menus~
:neusoft
cls
netsh interface ip reset "本地连接"
echo 设置IP...
netsh interface ip add address "本地连接" 192.168.20146 255.255.255.0
echo 设置网关...
netsh interface ip add address "本地连接" gateway=192.168.2.129 gwmetric=1
echo 设置DNS...
netsh interface ip set dns "本地连接" static 202.101.111.41 primary
del 本地连接
echo 设置IE代理...
@echo Windows Registry Editor Version 5.00>>r.reg
@echo [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings]>>r.reg
@echo "ProxyEnable"=dword:00000001>>r.reg
regedit /s r.reg
del r.reg
goto exit
:auto
cls
echo 设置IP...
netsh interface ip set address name="本地连接" source=dhcp
echo 设置DNS...
netsh interface ip set dns name="本地连接" source=dhcp
@echo Windows Registry Editor Version 5.00>>r.reg
@echo [HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings]>>r.reg
@echo "ProxyEnable"=dword:00000000>>r.reg
regedit /s r.reg
del r.reg
goto exit
:exit
cls
echo.
cho.
echo.
echo.
echo.
echo 恭喜!已完成所有设置.
echo.
echo.
echo.
echo.
echo.
echo.
pause
exit
相关文章推荐
- 轻松切换IP及IE代理设置
- 轻松切换IP及IE代理设置
- 自动切换IE代理设置: 简单使用IE自动配置脚本
- 批处理、VBS实现自动设置IP、默认网关、DNS、WINS、IE代理(全)
- 使用bat批处理脚本自动设置IP和IE代理
- 自动切换IE代理设置: 简单使用IE自动配置脚本
- 批处理、VBS实现自动设置IP、默认网关、DNS、WINS、IE代理!(一)
- 批处理、VBS实现自动设置IP、默认网关、DNS、WINS、IE代理!(二)
- 脚本切换windows IP 和 IE 代理
- 批处理:自升级+程序升级,根据MAC更改IP+IE代理自动设置
- 自动切换IE代理设置: 简单使用IE自动配置脚本
- 批处理、VBS实现自动设置IP、默认网关、DNS、WINS、IE代理!
- java模拟http的Get/Post请求,并设置ip与port代理
- java模拟http的Get/Post请求,并设置ip与port代理的方法
- c#百度排名点击器编写,设置代理ip
- 用vbs实现自动检查代理是否可用,并自动设置IE代理的脚本
- 为WebDriver 设置proxy(IE设置代理)
- IE设置自动获得代理(ISA2004&2006中设置相应项)
- 恢复域内用户设置IE代理
- idhttp 在delphi7下如何设置代理IP和Port