Test if an ActiveX control is installed with Javascript?

James P. Wright picture James P. Wright · Feb 1, 2010 · Viewed 13.4k times · Source

Is there a way to test if an ActiveX control is installed using Javascript?

Answer

Tomalak picture Tomalak · Feb 1, 2010
function AXOrNull(progId) {
  try {
    return new ActiveXObject(progId);
  }
  catch (ex) {
    return null;
  }
}