Windows Scripting
  Home arrow Windows Scripting arrow Page 5 - 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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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 - The heart of plug-in detection


    (Page 5 of 7 )

    What we’ll do instead is get to the heart of the plug-in detection.  It is done by trying to create an instance of each activeX control. If it works, the value true is passed back to the variable; if not, then the value false is passed back:

    checkForAcroRead7 = (IsObject(CreateObject("acroPDF.PDF.1")))

    checkForAcroRead6 = (IsObject(CreateObject("PDF.PdfCtrl.6")))

    checkForAcroRead5 = (IsObject(CreateObject("PDF.PdfCtrl.5")))

    checkForAcroRead4 = (IsObject(CreateObject("PDF.PdfCtrl.4")))

    checkForAcroRead3 = (IsObject(CreateObject("PDF.PdfCtrl.1")))

    checkForFlash7 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))

    checkforFlash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))

    checkforFlash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))

    checkForFlash4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))

    checkForFlash3 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))

    checkForQT6 = (IsObject(CreateObject("QuickTime.QuickTime.4")))

    checkForQT5 = (IsObject(CreateObject("QuickTimeCheckObject.QuickTimeCheck.1")))

    checkForReal = (IsObject(CreateObject("rmocx.RealPlayer G2 Control.1")))

    checkForSW10 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.1")))

    checkForSW9 = (IsObject(CreateObject("SWCt1.SWCt1.9")))

    checkForSW8 = (IsObject(CreateObject("SWCt1.SWCt1.8")))

    checkForSW7 = (IsObject(CreateObject("SWCt1.SWCt1.7")))

    checkForSW6 = (IsObject(CreateObject("SWCt1.SWCt1.1")))

    checkForWMP = (IsObject(CreateObject("MediaPlayer.MediaPlayer.1")))

    Where possible, we are checking for versions as well as whether the plug-in exists at all. 

    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

    - More Windows Scripting Workarounds from Nilpo
    - Overloading Methods and More in VBScript
    - Improving MFC for Windows Vista
    - Regular Expressions in VBScript
    - Working with Dates in WMI
    - Completing Calendars with VBScript Date Func...
    - Building Calendars with VBScript Date Functi...
    - Working With Dates and Times in VBScript
    - Designing WCF DataContract Classes Using the...
    - Understanding Dates and Times in VBScript
    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek