更改Internet Explorer设置编程? [英] Change Internet Explorer settings programmatically?

查看:217
本文介绍了更改Internet Explorer设置编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何想法,我应该怎么做以下用C#?

  1. 工具 - > Internet选项 - >安全
  2. 选择安全标签
  3. 点击自定义级别按钮
  4. 其他部分变化显示混合内容启用
解决方案

骗的方式来做到这一点是要改变值

  

HKEY_CURRENT_USER \软件\微软\的Windows \ CurrentVersion \互联网   设置\区\ 0 \ 1609   HKEY_CURRENT_USER \软件\微软\的Windows \ CurrentVersion \互联网   设置\区\ 1 \ 1609   HKEY_CURRENT_USER \软件\微软\的Windows \ CurrentVersion \互联网   设置\区\ 2 \ 1609   HKEY_CURRENT_USER \软件\微软\的Windows \ CurrentVersion \互联网   设置\区\ 3 \ 1609   HKEY_CURRENT_USER \软件\微软\的Windows \ CurrentVersion \互联网   设置\区\ 4 \ 1609

在哪里0-4区标识符和值是0到允许,1为提示,以及3座。请记住,如果你的code做到这一点对任何人的机器,但你自己的,你可能会发现你的code阻止恶意软件。

正确的方式做到这一点是使用API​​来创建一个IInternetZoneManager并调用的 SetZoneActionPolicy 调整中要调整的区域为URLACTION_HTML_MIXED_CONTENT的设置。

Any idea how do I do the following using C#?

  1. Going to Tools -> Internet Options -> Security
  2. Select the Security tab
  3. Click the Custom Level button
  4. In the Miscellaneous section change Display mixed content to Enable

解决方案

The "cheat" way to do this is to change the value

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0\1609 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1\1609 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1609 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1609 HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\4\1609

Where 0-4 are Zone identifiers and the value is 0 to Allow, 1 to Prompt, and 3 to Block. Keep in mind that if your code does this on anyone's machine but your own, you're likely to find your code blocked as malware.

The "proper" way to do this is to use the APIs to create an IInternetZoneManager and call SetZoneActionPolicy to adjust the settings for URLACTION_HTML_MIXED_CONTENT in the zones you want to adjust.

这篇关于更改Internet Explorer设置编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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