如何在IE设置中切换“使用自动配置脚本"复选框而不清除代理URL? [英] How to toggle 'Use Automatic Configuration script' checkbox in IE settings without clearing the proxy URL?

查看:51
本文介绍了如何在IE设置中切换“使用自动配置脚本"复选框而不清除代理URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要打开代理才能使用Internet,然后将其关闭以用于办公室Intranet.手动上很累.代理不会更改.如何仅使用bat文件切换复选框?如果启用了状态,则将禁用;如果禁用,则将启用.没什么.不想清除代理字符串.只需启用/禁用复选框即可.

解决方案

据我所知,通常,切换使用自动配置脚本"复选框不会清除代理服务器地址.但是它可能会清除使用自动配置脚本"复选框下的地址,因此,我想您希望在切换使用自动配置脚本"复选框时保留该地址.在这种情况下,请检查以下步骤:

从IE中添加地址设置后,请参考以下步骤检查有关使用自动配置"脚本设置的注册表设置,并获取DefaultConnectionSettings数据(该数据包含地址):

  1. 打开Regedit
  2. 导航至: HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet设置\连接
  3. 选中" DefaultConnectionSettings "

    此键的第9位控制设置.

    01-不检查任何内容(自动检测设置"或使用自动配置脚本")

    05-仅选中使用自动配置脚本"

    09-仅选中自动检测设置"

    0d-两者都被选中

    在使用自动配置脚本"下添加地址后,我们可以看到DefaultConnectionSettings数据包含该地址,请检查以下屏幕截图:

  4. 修改以上数据并关闭Internet Explorer,然后再次打开IE浏览器以确认更改已生效.

要选中/取消选中使用自动配置脚本",我们可以使用命令提示符运行以下命令以更改设置.

取消选中该选项并保留地址:

reg添加"HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet设置\连接"/f/v"DefaultConnectionSettings"/t REG_BINARY/d"460000000400000009000000000000000000000026000000687474703A2F2F7777772E78787878782E636F6D3A313233342F73616D269400000000000000

选中复选框并设置地址:

reg添加"HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet设置\连接"/f/v"DefaultConnectionSettings"/t REG_BINARY/d"46000000040000000d000000000000000000000026000000687474703703A2F2F7777772E78787878782E636F6D3A313233342F73616

您还可以在上面的命令中使用bat文件,如下所示:

  @echo关闭reg添加"HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet设置\连接"/f/v"DefaultConnectionSettings"/t REG_BINARY/d"46000000040000000d000000000000000000000026000000687474703A2F2F7777772E78787878782E636F6D3A313233342F73616D000000C600000000000000 

此外,如果要通过DefaultConnectionSettings项设置代理服务器地址,请参考以下命令(可以从注册表中检查DefaultConnectionSettings数据):

reg添加"HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet设置\连接"/f/v"DefaultConnectionSettings"/t REG_BINARY/d"46000000090000000F000000100000007777772E78787878782E636F6D3A38300000000026000000000000000000000000000000200000000000026377372637C

运行上述命令后,结果如下:

I need to switch on the proxy to use internet and switch it off for office intranet. Manually it is tiresome. The proxy does not change. How to just toggle the check box using bat file? If the status is enabled it will disable and if disable it will enable. Nothing much. Don't want to clear the proxy string. Just enabling/disabling the checkbox.

解决方案

As far as I know, generally, toggle the 'Use Automatic Configuration script' checkbox will not clear the proxy server address. But it might clear the Address under the 'Use Automatic Configuration script' checkbox, so, I suppose you want to keep the Address when toggle the 'Use Automatic Configuration script' checkbox. If that is the case, please check the following steps:

After adding the Address from IE setting, please refer to the following steps to check the registry setting about the Use Automatic Configuration script Setting, and get the DefaultConnectionSettings data (the data contain the address):

  1. Open Regedit
  2. Navigate to: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections
  3. check the "DefaultConnectionSettings"

    The 9th bit of this key controls the setting.

    01 - Nothing is checked ("Automatically detect settings" or "Use automatic configuration script")

    05 - Only "Use automatic configuration script" is checked

    09 - Only "Automatically detect settings" is checked

    0d - Both are checked

    After adding the Address under the "Use automatic configuration script", we can see the DefaultConnectionSettings data contains the address, please check the following screenshot:

  4. Modify above data and close Internet Explorer, and then open the IE browser again to verify the change has taken effect.

To checked/unchecked the "Use automatic configuration script", we could run the following commands using the Command Prompt to change the setting.

Unchecked the option and keep address:

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v "DefaultConnectionSettings" /t REG_BINARY /d "460000000400000009000000000000000000000026000000687474703A2F2F7777772E78787878782E636F6D3A313233342F73616D706C6553637269707400000000000000000000000000000000"

Checked the checkbox and set address:

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v "DefaultConnectionSettings" /t REG_BINARY /d "46000000040000000d000000000000000000000026000000687474703A2F2F7777772E78787878782E636F6D3A313233342F73616D706C6553637269707400000000000000000000000000000000"

Edit:

You could also use a bat file with the above command, like this:

@echo off

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v "DefaultConnectionSettings" /t REG_BINARY /d "46000000040000000d000000000000000000000026000000687474703A2F2F7777772E78787878782E636F6D3A313233342F73616D706C6553637269707400000000000000000000000000000000"

Besides, if you want to set the Proxy Server Address via the DefaultConnectionSettings key, please refer to the following command (you could check the DefaultConnectionSettings data from the Registry):

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /f /v "DefaultConnectionSettings" /t REG_BINARY /d "46000000090000000F000000100000007777772E78787878782E636F6D3A38300000000026000000687474703A2F2F7777772E78787878782E636F6D3A313233342F73616D706C6553637269707400000000000000000000000000000000"

After running above command, the result like this:

这篇关于如何在IE设置中切换“使用自动配置脚本"复选框而不清除代理URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆