批处理设置代理

原创 小姚  2022-04-24 18:06  阅读 2,473 次

手都设置代理上网比较麻烦,我们可以通过批处理来设置代理,代码如下。

批处理设置代理-小姚工作室

@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

取消代理

@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
本文地址:https://www.xiaoyaogzs.com/3951.html
关注我们:请关注一下我们的微信公众号:扫描二维码小姚工作室的公众号,公众号:小姚户外
版权声明:本文为原创文章,版权归 小姚 所有,欢迎分享本文,转载请保留出处!

发表评论 取消回复


表情

  1. 萧瑟
    萧瑟 @回复

    这脚本不错。