Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get/set Enhanced Protected Mode from c++ code

I need to get and set "Enhanced Protected Mode" option enabaled in IE10 and later from C++ code. I've googled a lot, but all solutions describe only how to do this manually not from code, but I need to do so in the installer of our IE add-on.

Any other solutions for this issue via registry, WMI or console command are very interesting too.

Can anybody help with this problem?

like image 909
Dmitry Inozemtsev Avatar asked Jan 12 '23 23:01

Dmitry Inozemtsev


2 Answers

Warning: This is not a supported behavior, and doing so may get your code flagged as malware by AV products or Microsoft's SmartScreen.

The "Enable Enhanced Protected Mode" checkbox in the Internet Control panel is controlled by the Isolation value under registry key: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main. It contains the value PMEM if AppContainers (EPM) should be used, or PMIL if non-EPM Integrity Levels (IL) should be used instead (default for IE10). There's no API to set this value as doing so is not supported.

Protected Mode itself is enabled or disabled on a per-Zone basis; the URLMon API SetZoneActionPolicy is used to adjust a Zone's settings (for URLAction_LOWRIGHTS) to enable or disable Protected Mode for that Zone.

like image 163
EricLaw Avatar answered Feb 26 '23 03:02

EricLaw


Did an update from 8.0 to 8.1 and there is no 'Isolation' key value name. But 'Enable Enhanced Protected Mode' is enabled. Looks like if the 'Isolation' value name is not present it has the same effect as having the value set to PMEM. The key value is created when you uncheck 'Enable Enhanced Protected Mode' and is updated each time you toggle the setting.

like image 33
dsmith Avatar answered Feb 26 '23 02:02

dsmith