Question

I'd like to be able to detect Vista IE7 Protected Mode within a page using javascript, preferably. My thinking is to perform an action that would violate protected mode, thus exposing it. The goal is to give appropriate site help messaging to IE7 Vista users.

Was it helpful?

Solution

What are you trying to accomplish that is substantially different for protected users? I've seen some window popup issues, but otherwise, clean JavaScript tends to be less affected. If you're finding that a block of code won't execute, why not do a check after attempted execution to see if the document is the state you expect, and alert if not.

If it's it using ActiveX, MS has a Protected Mode API: http://msdn.microsoft.com/en-us/library/ms537316.aspx

Protected mode is customizable, so you don't really have a reliable way of detecting it based on action violation. And many users disable UAC, so detecting via version won't work either (not to mention you may have the same headache with IE 8. Always best to test if something worked instead of assume by version.)

OTHER TIPS

Adobe Flash may behave differently (or not as expected) in Vista IE7 Protected Mode. The intention is to provide this feedback to the user.

I reviewed the MSDN documentation of the Protected Mode API from 6t7m4, and if I could call the ieframe.dll from javascript, such as:

var axo = new ActiveXObject("ieframe.dll");

I would be able to access the IEIsProtectedModeProcess() function, but I believe it's inaccesible due to security reasons.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top