I have been wondering if there's a way that a Web page can tell if it's running in IE7 Protected Mode on Windows Vista. It turns out that yes, there is, but it's not as simple as I'd like. My hope was that there would be flags that a page could check from JavaScript: ideally, a flag that says either "I'm in Protected Mode" "I've got normal privilege", or "I'm running as Administrator". I did I have been wondering if there’s a way that a Web page can tell if it’s running in IE7 Protected Mode on Windows Vista. It turns out that yes, there is, but it’s not as simple as I’d like.My hope was that there would be flags that a page could check from JavaScript: ideally, a flag that says either “I’m in Protected Mode” “I’ve got normal privilege”, or “I’m running as Administrator”.I didn’t find anything like that, even though IE 7 displays the Protected Mode status to the user. What I did find is an IE API, the IEIsProtectedModeProcess Function, which can tell a caller whether or not IE is a Protected Mode process by setting a BOOL parameter TRUE or FALSE. It’s in ieframe.dll, but only for IE 7 or later. And it is only supported in Microsoft Windows Vista or later. If you call it from earlier versions of Microsoft Windows, this function returns E_NOTIMPL as its HRESULT.So, if I have this right, I could call this function from an ActiveX control or an IE toolbar, after first dynamically loading it from ieframe.dll. If I called it from an ActiveX control, then the ActiveX control could in turn expose a COM property to JavaScript. I know how to do that.This seems like scratching your left ear with your right hand, doesn’t it? But it should work. Now I have to figure out how to safely tell if the IE process is running as Administrator. Somehow, I don’t think trying to reformat the system drive would be an ideal test. Software Development