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

sumit_batcoder
  • 3,369
  • 1
  • 25
  • 36
  • i think this is the duplicate of this question.. [How to Access AppData in IE Protected Mode (from a Managed BHO)](http://stackoverflow.com/questions/1992765/how-to-access-appdata-in-ie-protected-mode-from-a-managed-bho) – Shashi Jan 03 '11 at 06:42

2 Answers2

4

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

i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
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

Simon Mourier
  • 132,049
  • 21
  • 248
  • 298