以编程方式将受信任的站点添加到 Internet Explorer [英] Programmatically add trusted sites to Internet Explorer

查看:24
本文介绍了以编程方式将受信任的站点添加到 Internet Explorer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 WatiN 进行 IE 自动化项目.

I'm doing an IE automation project using WatiN.

单击要下载的文件时,我在 Internet Explorer 信息栏中看到以下内容:

When a file to be downloaded is clicked, I get the following in the Internet Explorer Information bar:

为了帮助保护您的安全,Internet Explorer 已阻止此网站从下载文件给你电脑.

To help protect your security, Internet Explorer has blocked this site from downloading files to you computer.

为了下载报告,我可以手动将该站点添加到 Internet Explorer 的受信任站点列表中,但我更愿意在 .NET 中以编程方式检查该站点是否受信任并将其添加到列表中(如果是)不是.

In order to download the report, I can manually add the site to Internet Explorer's list of trusted sites, but I would prefer to check programmatically in .NET to see if the site is trusted and add it to the list if it is not.

仅供参考,我目前使用的是 IE7.

FYI, I'm currently using IE7.

推荐答案

查看 这个

基本上看起来好像您所要做的就是在

Basically it looks as if all you have to do is create registry key in

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet SettingsoneMapDomainsDOMAINNAME

然后是一个名为http"的 REG_DWORD 值,值为==2

then a REG_DWORD value named "http" with value==2

这篇关于以编程方式将受信任的站点添加到 Internet Explorer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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