I am trying to detect the presence of an ActiveX plugin in my website. I am currently using:
function PrepareForBuyMallMoneyWithFBCredits(){
try {
control = new ActiveXObject('ActiveX name');
} catch (e) {
alert('fail');
}
alert(control);
}
I have confirmed that this code works against 开发者_如何转开发more standard ActiveX controls such as Adobe Acrobat Reader but I am trying to detect a custom ActiveX control. Problem is, the name that comes up in the plugin browser doesn't seem to be the one I should be searching for. Is there some way for me to find out what/where this name is? Also, is it possible to use the classid to achieve my desired results? Thanks.
Usually you'll find this name inside the win-registry.
Example for flash:
- Go in IE to tools->manage addons
- You'll find there an entry "Shockwave Flash Object"(thats the friendly name of the plugin)
- remember this name and go to the registry
- open the search-box inside the registry, type in this friendly name and check only the box "data"
- the search should find in HKEY_CLASSES_ROOT an key with a classId as name
(e.g. {HKEY_CLASSES_ROOT\CLSID{D27CDB70-AE6D-11cf-96B8-444553540000}) - inside this key should be a sub-key named "progId"
- open this key, it should have a standard-value(e.g. ShockwaveFlash.ShockwaveFlash.10)
- this standard-value is what you'll have to use as plugin-name inside your script.
精彩评论