Avatar of NickMalloy
NickMalloy
Flag for United States of America asked on

detecting if an activeX is installed

I'm trying to check if the users have a certain ActiveX installed on there machine. I have found several versions of code My question is what do I put into prodId or Control to find the appropriate ActiveX? I've tried what I though might be it, but it doesn't seem to work. Where do I find the information to plug in?

function AXOrNull(progId) {
  try {
    return new ActiveXObject(progId);
  }
  catch (ex) {
    return null;
  }
}

Open in new window


To

 var plugin = navigator.plugins["control"];
            if (plugin) {
                // Contoso control is installed and enabled
                $("#open").hide();
            } else {
                try {
                    plugin = new ActiveXObject("control");
                } catch (e) {
                    // Contoso control is not installed or disabled
                    $("#open").show("slow");
                }
            }

Open in new window

JavaScript

Avatar of undefined
Last Comment
Ganapathi

8/22/2022 - Mon
Ganapathi

I hope you are detecting a particular ActiveX installed on the system.

You should pass the AcriveX control name of the one you are searching for.

Every ActiveX has different names which you should know by searching on the internet OR by installing the ActiveX in your machine and find the name from Registry under "HKEY_CLASSES_ROOT".

Example:

Excel.Application
Excel.Chart
Scripting.FileSystemObject
WScript.Shell
Word.Document

AXOrNull("Excel.Chart")

function AXOrNull(progId) {
  try {
    return new ActiveXObject(progId);
  }
  catch (ex) {
    return null;
  }
}

Open in new window

NickMalloy

ASKER
yes, I'm looking for a certain one. when looking under "HKEY_CLASSES_ROOT". how do I know what maps to the Active X listed in IE. I don't see anything in the root of "HKEY_CLASSES_ROOT". that matches something listed in IE, expect the ClassID, but I don't see where a name is listed.
ASKER CERTIFIED SOLUTION
Ganapathi

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck