windows设置代理.bat 脚本

按照下列脚本复制到记事本中,保存,重命名后缀为.bat,使用时双击即可。

设置代理.bat,修改下列脚本中的代理地址和端口号

@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 "http=127.0.0.1:8080;https=127.0.0.1:8080" /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "<-loopback>" /f
echo 代理设置完成按任意键关闭 
pause>nul

取消代理.bat

@echo off 
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
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /f
echo IE代理清楚完成按任意键关闭 
pause>nul

猜你喜欢

转载自blog.csdn.net/hqzxsc2006/article/details/80612810
今日推荐