Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
250 views
Welcome To Ask or Share your Answers For Others

1 Answer

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

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settingsones1609 HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settingsones11609 HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settingsones21609 HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settingsones31609 HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settingsones41609

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...