批处理方式更改IE代理服务器
為什么80%的碼農都做不了架構師?>>> ??
本文永久地址:https://my.oschina.net/bysu/blog/1518423
寫在前面:
由于下面那些批處理運行后,不知道什么原因,總是不如愿,所以就想著從注冊表入手,于是便有了下面這一小段:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] "ProxyEnable"=dword:00000001 "ProxyHttp1.1"=dword:00000001 "ProxyServer"="127.0.0.1:1080"AutoConfigProxy:這個選項是自動設置代理
ProxyServer:輸入你的代理服務器ip:端口號
ProxyEnable:值為1的時候,默認勾選“為LAN使用代理服務器...”選項
--------------------------以上為“不最醉不龜歸”注------------------------------------
兩個批處理文件,一個開啟IE代理服務器,一個清除IE代理服務器。
當然,兩個文件都要是bat格式哦
唯一要注意的是:開啟的bat里,對于“本地地址不使用代理服務器”的勾選,是注冊表鍵ProxyOverride控制的,其值含有“<local>“時,表示勾選“本地地址不使用代理服務器”。
以下是開啟代碼:
@echo offecho 【修改IE】reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v?ProxyEnable?/t REG_DWORD /d 1 /freg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v?ProxyServer?/d "10.45.11.233:8080" /freg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v?ProxyOverride?/t REG_SZ /d "10.*.*.*;192.168.*.*;<local>" /fecho 正在刷新設置……ipconfig /flushdns關閉代理的代碼:
@echo offecho 【修改IE】reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /freg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "" /freg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "" /fecho 代理服務器設置已經清空echo 正在刷新設置……ipconfig /flushdns?
--------------------------------------------------------------------------------------------
rem 禁用代理 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /frem 刪除代理IP地址 reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /frem 禁用自動配制腳本(地址也被刪除) reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /frem 禁用自動檢測設置 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v DefaultConnectionSettings /t REG_BINARY /d 4600000000 /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v SavedLegacySettings /t REG_BINARY /d 4600000000 /f?
?
?
?
參考:
http://support.microsoft.com/kb/262981/zh-cn
http://zhidao.baidu.com/link?url=rQwTVnxXPy-C18B6-ajzI57B-jeQIrITpmI8Y3cBdz1_6AaffUTu8kMO-U8RtUdgBf8_MiVupAfX3-viVEDkT_
轉載于:https://my.oschina.net/bysu/blog/1518423
總結
以上是生活随笔為你收集整理的批处理方式更改IE代理服务器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux中什么是软件包组,Linux软
- 下一篇: server多笔记录拼接字符串 sql_