以编程方式添加受信任的站点到Internet Explorer站点、方式、Explorer、Internet

2023-09-02 10:23:41 作者:老夫掐指一算你命里缺我

我正在使用华廷的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的名单,但我会preFER检查编程方式在.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 SettingsZoneMapDomainsDOMAINNAME

则名为HTTP与价值== REG_DWORD值2

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

 
精彩推荐