How to detect IE Protected Mode using c#
Asked Answered
A

2

8

I am building an IE Extension, and I need to keep my Access Database file in the Appdata folder. It's working fine. But in many systems where IE IE Protected Mode is ON, it crashes, I guess this is because IE Protected Mode doesn't allow Extensions to access Appdata. I was trying to find a way out so that I can detect if IE is in Protected Mode through my extension. Please give some code snippets and some links to get me out of this issue.

Regards

I am attaching a screenshot of error as well. alt text

Assay answered 3/1, 2011 at 6:33 Comment(1)
i think this is the duplicate of this question.. How to Access AppData in IE Protected Mode (from a Managed BHO)Ingrowth
T
4

I would use IEIsProtectedModeProcess(), but you're on your own for interop.

Trousseau answered 3/1, 2011 at 16:12 Comment(0)
C
3

You're looking for the IE process "Integrity Level". See the official doc here: Determining Process Integrity Levels with a sample in C++, and you will find a sample written in C# here: Getting Process Integrity Level in Vista using Pinvoke

Cushion answered 3/1, 2011 at 6:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.