@echo off
echo ************************************
echo ****** 请选择网络环境 ********
echo ****** 1-- 内网环境 ********
echo ****** 2-- 非办公地点 ********
echo ****** 3-- 退出 ********
echo ************************************
set /p Select=请输入数字并回车:
if /i "%Select%" == "1" goto Pnet
if /i "%Select%" == "2" goto Other
if /i "%Select%" == "3" exit
:Pnet
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 "10.x.x.x:xxxx" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "11.*;12.*;10.*;<local>" /f
goto Exit
:Other
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 "" /f
goto Exit
:Exit
echo 代理服务器设置完成,按任意键退出!
pause>nul
exit