views:

21

answers:

0

I'm building a "diagnosis" page that determines various settings on a client's environment to help diagnose setup and connection issues. (e.g. cookies turned on, popups enabled, etc.)

For a part of this page I'd like to check... if the browser is Internet Explorer, if the user has administrative rights or not... as they will be needed to correctly install/uninstall a plugin. (done separately... at some other time)

In this particular case, the end user does have the following set (or will be requested to temporarily toggle for the test):

  • Tools> Internet Options> Security> Custom Level> ActiveX controls and plug-ins
  • Initialize and script ActiveX controls not marked as safe for scripting (to either Enable or Prompt)

I'm fine with any test, even if it is something like this (I just need an applicable test that will work)

try{
  var foo = new ActiveXObject("Something.orOther");
  foo.attemptSomeActionRequiringAdminAccess();
  hasAdmin = true;
}catch(ex){
  hasAdmin = false;      
}

In theory the "JScript" could call some client side "VBScript" as well if needed... however I would certainly want to make sure the "test" action is not destructive...

(This would be mainly for IE7/IE8, but if it works in IE6/IE9 too that would be great)