IE设置代理IP的bat脚本

@echo off
path;C:\Program Files (x86)\Internet Explorer;C:\Program Files\Internet Explorer;C:\WINdows\system32\;\windows\system32\wbem;
set ie_proxy=192.168.0.111:8080
cls
:main
echo.  
echo =======================================================
echo.  
echo                    1. 设置代理
echo.  
echo                    2. 删除代理
echo.  
echo =======================================================
echo.  
set /p choice=输入你要执行的项目序号(1,2):  

if %choice%==1 goto set_proxy
if %choice%==2 goto del_proxy

:set_proxy
echo.
echo 正在设置IE代理! 完成后会重启浏览器!
taskkill /f /im iexplore.exe >nul 2>&1
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 "%ie_proxy%" /f  
::跳过本地地址的代理服务器  
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "" /f 

ping -n 5 127.0.0.1 >nul

start iexplore.exe http://ip.gs
goto main


:del_proxy
echo.
echo 正在删除IE代理! 完成后会重启浏览器!
taskkill /f /im iexplore.exe >nul 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
ping -n 5 127.0.0.1 >nul

start iexplore.exe http://ip.gs
echo.
goto main

你可能感兴趣的:(IE设置代理IP的bat脚本)