views:

776

answers:

4

I'm updating a legacy app and it has some functionality that detects the version of Internet Explorer that's installed, just for display and error reporting not because any components are required. The code used for IE version detection is basically the code from VBnet - DllGetVersion: Detailed Internet Explorer Version Info (Author: Kay-Christian Hansen, VBnet - Randy Birch). Unfortunately this code doesn't detect IE version greater than IE6.

So I'm wondering what the accepted VB6 method of detecting the installed version of Internet Explorer is these days?

Thanks.

+1  A: 

You could access registry to do that.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version.
shahkalpesh
A: 

Hi,

I searched around and I couldn't really find anything. Kind of obscure for some reason. I did find this link where someone posted a solution but I coulnd't get it to fully work! :) I'm not really a vb guy so maybe you could. Here's the link if your interested:

http://www.visualbasicscript.com/m_64130/tm.htm

Edit:

I actually missed some code on the bottom of that page and that code seemed to work well in getting the version of IE. I kinda simplified his code a little bit:

Dim oFS = CreateObject("Scripting.FileSystemObject")
Dim version = oFS.GetFileVersion("c:\windows\system32\ieframe.dll")
MsgBox("Your IE version is: " & version)

Hope this helps!

CalebHC
+1  A: 

Why not just rip it out? It sounds rather meaningless and clearly has become a support burden.

Bob Riemersma
I love your answer.
Nosredna
+1. Feature is apparently intended to save time when supporting problems. When you have had to spend a significant amount of time eztablishing the version of IE on support calls, then reimplement it.
MarkJ
+2  A: 
Beaner