Windows Scripting
  Home arrow Windows Scripting arrow Page 6 - 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 - Displaying the results


    (Page 6 of 7 )

    Now comes the part where we display the results of these tests to the user:

    if checkForAcroRead7 = true then

      document.write("<br><b>You have Adobe Acrobat Reader version 7 installed.</b>")

    elseIf checkForAcroRead6 = true then

      document.write("<br><b>You have Adobe Acrobat Reader version 6 installed.</b>")

    elseIf checkForAcroRead5 = true then

      document.write("<br><b>You have Adobe Acrobat Reader version 5 installed.</b>")

    elseIf checkForAcroRead4 = true then

      document.write("<br><b>You have Adobe Acrobat Reader version 4 installed.</b>")

    elseIf checkForAcroRead3 = true then

      document.write("<br><b>You have Adobe Acrobat Reader version 3 installed.</b>")

    else

      document.write("<br><b>You do not have Adobe Acrobat Reader installed</b>")

    end if

    if checkForFlash7 = true then

      document.write("<br><b>You have Flash Player 7 installed.</b>")

    elseIf checkForFlash6 = true then

      document.write("<br><b>You have Flash Player 6 installed.</b>")

    elseIf checkForFlash5 = true then

      document.write("<br><b>You have Flash Player 5 installed.</b>")

    elseIf checkForFlash4 = true then

      document.write("<br><b>You have Flash Player 4 installed.</b>")

    elseIf checkForFlash3 = true then

      document.write("<br><b>You have Flash Player 3 installed.</b>")

    else

      document.write("<br><b>You do not have Flash Player Installed.</b>")

    end if

    if checkForQT6 = true then

      document.write("<br><b>You have Quicktime Player 6 installed.</b>")

    elseIf checkForQT5 = true then

      document.write("<br><b>You have Quicktime Player 5 installed.</b>")

    else

      document.write("<br><b>You do not have Quicktime installed.</b>")

    end if

    if checkForReal = true then

      document.writeln("<br><b>You have Real Player installed.</b>")

    else

      document.write("<br><b>You do not have Real Player installed.</b>")

    end if

    if checkForSW10 = true then

      document.write("<br><b>You have Shockwave Player 10 installed.</b>")

    elseif checkForSW9 = true then

      document.write("<br><b>You have Shockwave Player 9 installed.</b>")

    elseif checkForSW8 = true then

      document.write("<br><b>You have Shockwave Player 8 installed.</b>")

    elseif checkForSW7 = true then

      document.write("<br><b>You have Shockwave Player 7 installed.</b>")

    elseif checkForSW6 = true then

      document.write("<br><b>You have Shockwave Player 6 installed.</b>")

    else

      document.write("<br><b>You do not have Shockwave Player installed.</b>")

    end if

    if checkForWMP = true then

      document.write("<br><b>You have Windows Media Player installed.</b>")

    else

      document.write("<br><b>You do not have Windows Media installed.</b>")

    end if

    Now you just close off the script:

    </script>

    And save the page as pluginChecker.htm. Open it in MSIE and see for yourself which versions of which plug-ins you have installed. Windows XP Service Pack 2 users will get the infobar blocking the active content, so good practice dictates that instructions for handling this should be placed on any publicly viewed pages.

    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 5 hosted by Hostway
    Stay green...Green IT