Any idea how do I do the following using C#?
- Going to
Tools -> Internet Options -> Security
- Select the
Security
tab - Click the
Custom Level
button - In the
Miscellaneous
section changeDisplay mixed content
toEnable
Any idea how do I do the following using C#?
Tools -> Internet Options -> Security
Security
tabCustom Level
buttonMiscellaneous
section change Display mixed content
to Enable
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.