在Windows中使用脚本将异常添加到代理设置 [英] Adding exception to Proxy Settings with a script in Windows

查看:122
本文介绍了在Windows中使用脚本将异常添加到代理设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows 7,并且具有在启动时初始化的代理配置.每次重新启动PC时,我都必须重新打开代理设置"并手动添加新的代理例外IP地址.

I am using Windows 7 and I have a proxy configuration which is initialized on startup. Each time I reboot my PC I have to reopen Proxy Settings and add new proxy exception ip addresses manually.

例如,每次重新启动

www.google.com; www.yahoo.com; www.facebook.com

www.google.com;www.yahoo.com;www.facebook.com

默认情况下,

已在例外列表中.比起我必须转到代理设置"并添加

are already in exception list by default. Than I have to go to Proxy Settings and add

www.addresfromscript.com; ip.from.script

www.addresfromscript.com; ip.from.script

用手

.在重新启动时,我输入的IP地址消失了.我想自动执行此任务.

by hand. On reboot ip addresses I entered are gone. I want to automate this task.

我需要一个Windows脚本来在启动时添加代理例外.我该怎么办?

I need a Windows script to add proxy exceptions at startup. How can I do that?

推荐答案

我希望使更改永久化,而不是自动执行此过程.启动 Regedit ,转到 HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet设置,然后查看条目 ProxyOverride .有一个用;分隔的URL列表.只需添加所需的地址,保存更改并重新启动窗口即可.

Instead of an automation of this process, I'd rather make the changes permanent. Start Regedit, go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings and take a look at the entry ProxyOverride. There is a list of URLs separated with ;. Just add the desired addresses, save the changes and restart windows.

但是,如果您仍然想自动执行此注册表更改,则可以将修改后的值导出到.reg文件中,并使用以下代码行创建批处理:

However, if you still want to automate this registry change, you can export the modified value into a .reg file and create a batch with this line of code:

regedit <exported_reg_file>

这篇关于在Windows中使用脚本将异常添加到代理设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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