![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | IE7 detect protected mode in script 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. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: IE7 detect protected mode in script Here's a general article that describes a variety of interesting bits about protected mode in IE: http://msdn.microsoft.com/library/de...tectedMode.asp This section of MSDN describes protected mode: http://msdn.microsoft.com/library/de..._ref_entry.asp The IEIsProtectedModeProcess() function will return a result indicating whether IE is running in protected mode: http://msdn.microsoft.com/workshop/s...odeprocess.asp -- Steve Riley steve.riley@microsoft.com http://blogs.technet.com/steriley http://www.protectyourwindowsnetwork.com "Ty" <tyn@newsgroups.nospam> wrote in message news:ei9%23RC7AHHA.3560@TK2MSFTNGP04.phx.gbl... 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. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: IE7 detect protected mode in script 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 Steve Riley [MSFT] wrote: > Here's a general article that describes a variety of interesting bits > about protected mode in IE: > http://msdn.microsoft.com/library/de...tectedMode.asp > > This section of MSDN describes protected mode: > http://msdn.microsoft.com/library/de..._ref_entry.asp > > The IEIsProtectedModeProcess() function will return a result indicating > whether IE is running in protected mode: > http://msdn.microsoft.com/workshop/s...odeprocess.asp > > -- > Steve Riley > steve.riley@microsoft.com <mailto:steve.riley@microsoft.com> > http://blogs.technet.com/steriley > http://www.protectyourwindowsnetwork.com > > > > "Ty" <tyn@newsgroups.nospam <mailto:tyn@newsgroups.nospam>> wrote in > message news:ei9%23RC7AHHA.3560@TK2MSFTNGP04.phx.gbl... > 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. |
My System Specs![]() |
| | #4 (permalink) |
| | Re: IE7 detect protected mode in script Here is the script to solve all your problems: if (navigator.userAgent.indexOf("Mac") > -1) { alert("Not in protected mode!") } -- ThePluginGuy ------------------------------------------------------------------------ ThePluginGuy's Profile: http://forums.techarena.in/member.php?userid=19136 View this thread: http://forums.techarena.in/showthread.php?t=622126 http://www.techarena.in |
My System Specs![]() |
| | #5 (permalink) |
| | Re: IE7 detect protected mode in script I think you'll find that the sample script should read if (navigator.userAgent.indexOf("Mac") == -1) { alert("Not in protected mode!") } -- tdinneen ------------------------------------------------------------------------ tdinneen's Profile: http://forums.techarena.in/member.php?userid=19137 View this thread: http://forums.techarena.in/showthread.php?t=622126 http://www.techarena.in |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Detect IE 7 Protected mode using javascript | Vista security | |||
| Detect Vista in Logon Script | Vista account administration | |||
| Re: mailto from Protected Mode: Off to Protected Mode: On | Vista mail | |||
| IE 7 Protected Mode: Off | Vista security | |||
| IE7 Protected Mode: Off | Vista security | |||