通过IE自动设置系统代理

开启

@echo off 

echo 
echo              ======= 开始设置IE代理 ========
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f 
start iexplore.exe
ping 127.1 -n 1 >nul
@echo off 
taskkill /im iexplore.exe /f
echo 
echo          ======= IE代理设置完成,正在关闭 =======

ping 127.1 -n 2 >nul


清除

@echo off 
echo 
echo              ======= 开始清除IE代理设置 ========
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f 
start iexplore.exe
ping 127.1 -n 1 >nul
@echo off 
taskkill /im iexplore.exe /f
echo 
echo          ======= IE代理清除完成,正在关闭 =======
ping 127.1 -n 2 >nul


更改

@echo off 
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 "88.81.235.214:8080" /f 
echo 代理设置完成按任意键关闭 (88.81.235.214:8080)
pause>nul



下面的单个文件可以实现开启和关闭

@echo off
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable | findstr 0x0
IF %ERRORLEVEL% LEQ 0 ( echo              ======= 开始设置IE代理 ========
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f 
start iexplore.exe
ping 127.1 -n 1 >nul
@echo off 
taskkill /im iexplore.exe /f
echo 
echo          ======= IE代理设置完成,正在关闭 =======
ping 127.1 -n 2 >nul ) ELSE ( echo              ======= 开始取消IE代理 ========
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f 
start iexplore.exe
ping 127.1 -n 1 >nul
@echo off 
taskkill /im iexplore.exe /f
echo 
echo          ======= IE代理取消完成,正在关闭 =======
ping 127.1 -n 2 >nul )





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值