I'm trying to figure out in an IE script (javascript or vbscript) which ActiveX control will handle a specific mime type, "image/tiff" in this case. This is easy to do in other browsers that use plugins with;
navigator.mimeTypes["image/tiff"].enabledPlugin.name
which would return something like
QuickTime Plug-in X.X.X
I've found plenty of examples to tell if a specific ActiveX control is loaded but since there are several ActiveX controls available that can handle tiff images I need to know which, if any, is registered to handle this mime type.
The problem I'm trying to deal with is that QuickTime always wants to register itself as the default tiff viewer but it does a terrible job of it resulting in lots of support calls. Unfortunately, simply detecting that QuickTime is installed isn't good enough since the user may also have another tiff viewer installed (like Alternatiff) as the default tiff viewer or the user may have configured QuickTime to not be the default viewer for tiff images so the browser could be using a helper app to display the image instead.
Not meaning to be difficult but before anyone suggests reengineering workarounds;
Thanks in advance for any suggestions or solutions...
At least with current capabilities of Internet Explorer, it is pretty much impossible to accomplish your stated goal with Javascript.
However, IE also supports VBScript and signed ActiveX controls. You could use those to build a client-side widget to get the default MIME-type association directly from the registry. Windows keeps them in "HKEY_LOCAL_MACHINE\Software\CLASSES\". The RFC2936 - HTTP MIME Type Handler Detection gives a similar suggestion and even has a code sample.
If the above seems too cumbersome, then you could expand on your initial policy of not restricting the user to a specific viewer. Why not go all the way and let users stay with QuickTime if they have it in the first place. The user's machine is private territory and you have no way of knowing why QuickTime is there.
Hope this helps to get you moving in the right direction.