IE7 detect protected mode in script

  • Thread starter Thread starter Ty
  • Start date Start date
T

Ty

Hi,

I was referred to this group because the people on the scripting/IE
groups thought I'd have better luck here.

I need to identify if IE7 is running in protected mode on Vista so my
web page can help the user (in a user friendly way) add my site to their
trusted zone.

Does anyone know how to do this using scripting?

I've had the following 2 suggestions so far:
1. get the temp directory and if it ends in a directory called "Low"
then the browser is likely to be in protected mode.

2. use a try/catch block to capture the exception from performing an
operation that is prohibited when running in protected mode.

I like the 2nd suggestion the best since it will probably get fewer
false positives than the 1st suggestion.

Does anyone have a suggestion for the prohibited operation I should use?

Naturally, I want the script to be as reliable and robust as possible.
It's pretty frustrating that there is a function to do this when writing
a browser extension but there seems to be nothing when scripting on web
pages...


Thanks
Ty

Please reply to the group as my e-mail probably won't work.
 
Here's a general article that describes a variety of interesting bits about protected mode in IE: http://msdn.microsoft.com/library/d...ry/en-us/IETechCol/dnwebgen/ProtectedMode.asp

This section of MSDN describes protected mode: http://msdn.microsoft.com/library/default.asp?url=/workshop/security/protmode/pmie_ref_entry.asp

The IEIsProtectedModeProcess() function will return a result indicating whether IE is running in protected mode: http://msdn.microsoft.com/workshop/...erence/functions/ieisprotectedmodeprocess.asp

--
Steve Riley
(e-mail address removed)
http://blogs.technet.com/steriley
http://www.protectyourwindowsnetwork.com


Hi,

I was referred to this group because the people on the scripting/IE
groups thought I'd have better luck here.

I need to identify if IE7 is running in protected mode on Vista so my
web page can help the user (in a user friendly way) add my site to their
trusted zone.

Does anyone know how to do this using scripting?

I've had the following 2 suggestions so far:
1. get the temp directory and if it ends in a directory called "Low"
then the browser is likely to be in protected mode.

2. use a try/catch block to capture the exception from performing an
operation that is prohibited when running in protected mode.

I like the 2nd suggestion the best since it will probably get fewer
false positives than the 1st suggestion.

Does anyone have a suggestion for the prohibited operation I should use?

Naturally, I want the script to be as reliable and robust as possible.
It's pretty frustrating that there is a function to do this when writing
a browser extension but there seems to be nothing when scripting on web
pages...


Thanks
Ty

Please reply to the group as my e-mail probably won't work.
 
Hi,

Thanks for the response and the links. I had hit these pages already
and thought that the code examples and API were for browser extensions
only. There seemed to be nothing for web page scripting.

Have I misread/misinterpreted the information? I'm not a programmer so
it wouldn't surprise me if I have.

If I have, can you give me an example (or point me to an example) of
using IEIsProtectedModeProcess() in script?


Thanks,
Ty
 
Back
Top