Detecting Plugins in Internet Explorer - Extending the Script
(Page 7 of 7 )
We can extend this script further and check for other applications installed on the client computer:
checkForExcel = (IsObject(CreateObject("Excel.Application")))
checkForWord = (IsObject(CreateObject("Word.Application")))
checkForPowpoint = (IsObject(CreateObject("Powerpoint.Application")))
checkForAccess = (IsObject(CreateObject("Access.Application")))
…
if checkForExcel = true then
document.write("<br><b>You have Microsoft Excel Installed.</b>")
else
document.write("<br><b>You do not have Microsoft Excel Installed.</b>")
end if
if checkForWord = true then
document.write("<br><b>You have Microsoft Word Installed.</b>")
else
document.write("<br><b>You do not have Microsoft Word Installed.</b>")
end if
if checkForPowpoint = true then
document.write("<br><b>You have Microsoft Powerpoint Installed.</b>")
else
document.write("<br><b>You do not have Microsoft Powerpoint Installed.</b>")
end if
if checkForAccess = true then
document.write("<br><b>You have Microsoft Access Installed.</b>")
else
document.write("<br><b>You do not have Microsoft Access Installed.</b>")
end if
Or even:
checkForPhotoshop = (IsObject(CreateObject("Photoshop.Application")))
…
if checkForPhotoshop = true then
document.write("<br><b>You have Adobe Photoshop Installed.</b>")
else
document.write("<br><b>You do not have Adobe Photoshop Installed.</b>")
end if
In addition to the infobar warning, unfortunately, users will also get a nasty yes/no box about unsafe activeX controls, which will probably just make visitors leave your site very quickly.
Now, the page is not pretty. It's cold, and it's basic. If pressed, you could probably get VBScript to draw a table and insert the results of each test into that, along with a pretty little logo of the plug-in and a button linking to the plug-in vendor's site that would be invisible if the plug-in was installed, but visible if it was not. Of course, that would be another article in itself.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |