---
title: "批处理方式更改IE代理服务器"
author: "dingherry"
date: "2014-04-03T10:37:24Z"
tags: []
categories: ["操作系统"]
slug: "ie"
draft: false
lastmod: "2014-04-03T10:37:24Z"
id: 2040368
url: "https://dingherry.iteye.com/blog/2040368"
---

两个批处理文件，一个开启IE代理服务器，一个清除IE代理服务器。

当然，两个文件都要是bat格式哦

 

唯一要注意的是：开启的bat里，对于“本地地址不使用代理服务器”的勾选，是注册表键ProxyOverride控制的，其值含有“&lt;local&gt;“时，表示勾选“本地地址不使用代理服务器”。

 

以下是开启代码：

 

@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 "10.45.11.233:8080" /f

 

reg add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings" /v ProxyOverride /t REG\_SZ /d "10.\*.\*.\*;192.168.\*.\*;**&lt;local&gt;**" /f

 

echo 正在刷新设置……

ipconfig /flushdns

 

 

关闭代理的代码：

 

@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 add "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings" /v ProxyOverride /t REG\_SZ /d "" /f

 

echo 代理服务器设置已经清空

 

echo 正在刷新设置……

ipconfig /flushdns

 

 

 

参考：

[http://support.microsoft.com/kb/262981/zh-cn](http://support.microsoft.com/kb/262981/zh-cn)

[http://zhidao.baidu.com/link?url=rQwTVnxXPy-C18B6-ajzI57B-jeQIrITpmI8Y3cBdz1\_6AaffUTu8kMO-U8RtUdgBf8\_MiVupAfX3-viVEDkT\_](http://zhidao.baidu.com/link?url=rQwTVnxXPy-C18B6-ajzI57B-jeQIrITpmI8Y3cBdz1_6AaffUTu8kMO-U8RtUdgBf8_MiVupAfX3-viVEDkT_)