IE 11 Enhanced Protected Mode detecting/turning off programatically

Add-in Express™ Support Service
That's what is more important than anything else

IE 11 Enhanced Protected Mode detecting/turning off programatically
James Bourne


IE 11 switches on Enhanced Protected Mode (EPM) by default.

My Add-on relies on Wininet to be able to manipulate cookies and it doesn't work with EPM turned on - won't allow me to use DeleteUrlCacheEntry.

I have read from your previous postings that EPM does not have an API for manipulating cookies and other resources.

Therefore, unless you know another way, I need to warn the user that my Add-on will not work with EPM turned on and/or allow the user to choose to switch it off.

Do you know of a way to detect if EPM is turned on and, even better, a way of turning it off within an Add-on?

Many thanks.
Posted 28 Oct, 2013 14:15:08 Top
Sergey Grischenko

Add-in Express team

Posts: 7233
Joined: 2004-07-05
Hi James,

You can use the code below to check if EPM is enabled.

        private bool IsEPMEnabled()
            using (RegistryKey key = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Internet Explorer\Main", false))
                if (key != null)
                    return ((string)key.GetValue("Isolation", String.Empty) == "PMEM"); 

            return false;
Posted 30 Oct, 2013 09:39:36 Top
James Bourne



That works great.

I use VB and have created an equivalent VB function.

How do you get code into these forum posts with the formatting as you did for the C# example above?
Posted 02 Nov, 2013 08:41:05 Top
Andrei Smolin

Add-in Express team

Posts: 18662
Joined: 2006-05-11
Hello James,

You insert the code-formatting pseudo-tags using the CODE button at the top of the Reply Form.

Andrei Smolin
Add-in Express Team Leader
Posted 04 Nov, 2013 01:07:21 Top
James Bourne


Fantastic! VB below:
    Private Function IsEPMEnabled() As Boolean
        If My.Computer.Registry.GetValue("HKEY_CURRENT_USERSoftware\Microsoft\Internet Explorer\Main", "Isolation", Nothing) Is Nothing Then
            Return False
            Return My.Computer.Registry.GetValue("HKEY_CURRENT_USERSoftware\Microsoft\Internet Explorer\Main", "Isolation", Nothing) = "PMEM"
        End If
    End Function
Posted 23 Nov, 2013 03:23:42 Top