BAT脚本开启关闭IE代理服务器

1,281 次浏览

BAT脚本开启、关闭IE代理服务器。开启IE.exe因为Chrome必须刷新一下IE才生效。

开启代理:

Bat代码
@echo off  

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 "proxy3.bj.petrochina:8080" /f  

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "*.cnpc;*.petrochina;10.*.*.*;11.*.*.*;localhost*;<local>" /f  

ipconfig /flushdns  

start "" "C:\Program Files\Internet Explorer\iexplore.exe"  

taskkill /f /im iexplore.exe  

关闭代理:

Bat代码

 

@echo off   

taskkill /f /im Shadowsocks.exe

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   

ipconfig /flushdns  

start "" "C:\Program Files\Internet Explorer\iexplore.exe"  

taskkill /f /im iexplore.exe  

 

BAT脚本开启关闭IE代理服务器

《BAT脚本开启关闭IE代理服务器》有1条留言

  1. Pingback引用通告: ss代理kexue上网 – ZQ-Blog

留下评论