Windows Scripting
  Home arrow Windows Scripting arrow Page 3 - Detecting Plugins in Internet Explorer
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Detecting Plugins in Internet Explorer
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 28
    2005-04-18

    Table of Contents:
  • Detecting Plugins in Internet Explorer
  • How Navigator Handles the Problem
  • IE's Approach
  • Getting started
  • The heart of plug-in detection
  • Displaying the results
  • Extending the Script

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Detecting Plugins in Internet Explorer - IE's Approach


    (Page 3 of 7 )

    Unfortunately, Microsoft's Internet Explorer is not quite as helpful; the browser itself has no plugins array (and doesn't actually support plug-ins) so JavaScript cannot be employed quickly and easily to provide a report of any installed plug-ins. ActiveX objects (often called activeX controls) are implemented in Explorer in much the same way as plug-ins; however, it should be noted that they are separate things. Makers of plug-ins will have to produce separate activeX objects for use specifically in IE. 

    One of the things plug-in makers need to do when creating their activeX objects is to assign these objects a unique value known as the CLSID or classid.  One of the ways in which we can test the browser for installed objects is through the use of this CLSID value, which is different for all activeX objects. Some differing versions of the same activeX object will have the same CLSID value, however; Windows Media Player 7 and 8 are an example of this, which have a CLSID of {6BF52A52-394A-11D3-B153-00C04F79FAA6}. You can find this value and others in the Windows registry using RegEdit or a similar tool.

    Another value that these objects will has is the progID; again, these strings are unique to the object they represent, but different versions of the same object may share the same progID, and the versions that a progID refer to may not be logical. For example, the progID for Shockwave Player version 6 is SWCtl.SWCtl.1, whereas the progID for version 7 is SWCtl.SWCtl.7 which makes detecting player versions prior to version 6 somewhat difficult. In reality however, it is unlikely that many people have a version this old installed on their systems. 

    In truth, you could probably get away with writing an expression that tested for versions 8, 7, 6 or less than 6, rather than testing for every single version. This is just an example however; Shockwave Player is now at version 10, and tests for this will be worked into our object tester. Another thing to watch for is that applications may suddenly change their progID values between versions for no logical reason; Adobe’s Acrobat Reader version 6 has a progID of PDF.PdfCtrl.6, whereas Acrobat Reader version 7 has the progID AcroPDF.PDF.1 which again, can make things tricky if you don’t arm yourself with the correct information each time a new version of the plug-in is released.

    You could, of course, have a page on your site that had embedded files of all major plug-ins on it, and some text below each one that says something like: if this file fails to play, you do not have an appropriate player/plug-in installed.  But frankly, this is rubbish.

    More Windows Scripting Articles
    More By Dan Wellman


       · Thanks for the article. Its a big help, confirmed my suspicions that yet again IE is...
       · Thanks, I'm glad the article helped
       · createObject("Word.Application") will actually fire up WINWORD.EXE in the...
       · Interesting, thanks for pointing that out AllanDan
     

    WINDOWS SCRIPTING ARTICLES

    - Introducing Two-Way Data Binding using Silve...
    - Silverlight 2.0 Application Development with...
    - Burning Multisession CDs with IMAPI2 in WSH
    - Creating a Silverlight 2.0 Application that ...
    - Burning CDs with the IMAPI2 Control
    - Burning CDs in Windows XP with WSH
    - Advanced Word Object Scripting
    - Reading and Printing Word Documents in WSH
    - Scripting Microsoft Word
    - Using WSH to Catalog MP3 Files
    - Reading MP3 ID3 Tags in WSH
    - A Brief Look at Menus in WPF
    - More Examples of Simplified Image Processing...
    - Completing a WPF To-Do List Application
    - Simplified Image Processing in GDI+





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT