Link to home
Start Free TrialLog in
Avatar of jamestse
jamestse

asked on

How vb detect IE version?

Did anyone know how to detect Internet explorer version in win95/98/NT/2000?
Avatar of VBGuru
VBGuru
Flag of India image

Determining Which Version of Internet Explorer You Are Using

--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Internet Explorer for Windows 3.1
Microsoft Internet Explorer for Windows 95
Microsoft Internet Explorer for Windows NT 4.0
Microsoft Internet Explorer for Macintosh
Microsoft Internet Explorer for UNIX on Sun Solaris
Microsoft Internet Explorer for Windows 98
Microsoft Windows 2000 Advanced Server
Microsoft Windows 2000 Datacenter Server
Microsoft Windows 2000 Professional
Microsoft Windows 2000 Server
Microsoft Internet Explorer version 5.01 for Windows 98 Second Edition
Microsoft Windows 98
Microsoft Windows 98 Second Edition

--------------------------------------------------------------------------------


SUMMARY
This article describes how to determine which version of Internet Explorer you are using.



MORE INFORMATION

Internet Explorer for Windows 95/98 or Windows NT
Internet Explorer version numbers use the following format:
major version.minor version. build number.sub-build number
The following list includes possible Internet Explorer version numbers:

   Version          Product
   -----------------------------------------------------------------
   4.40.308         Internet Explorer 1.0 (Plus!)
   4.40.520         Internet Explorer 2.0
   4.70.1155        Internet Explorer 3.0
   4.70.1158        Internet Explorer 3.0 (OSR2)
   4.70.1215        Internet Explorer 3.01
   4.70.1300        Internet Explorer 3.02 and 3.02a
   4.71.544         Internet Explorer 4.0 Platform Preview 1.0 (PP1)
   4.71.1008.3      Internet Explorer 4.0 Platform Preview 2.0 (PP2)
   4.71.1712.6      Internet Explorer 4.0
   4.72.2106.8      Internet Explorer 4.01
   4.72.3110.8      Internet Explorer 4.01 Service Pack 1 (SP1)
   4.72.3612.1713   Internet Explorer 4.01 Service Pack 2 (SP2)
   5.00.0518.10     Internet Explorer 5 Developer Preview (Beta 1)
   5.00.0910.1309   Internet Explorer 5 Beta (Beta 2)
   5.00.2014.0216   Internet Explorer 5
   5.00.2314.1003   Internet Explorer 5 (Office 2000)
   5.00.2614.3500   Internet Explorer 5 (Windows 98 Second Edition)
   5.00.2516.1900   Internet Explorer 5.01 (Windows 2000 Beta 3, build
                    5.00.2031)
   5.00.2919.800    Internet Explorer 5.01 (Windows 2000 RC1, build
                    5.00.2072)
   5.00.2919.3800   Internet Explorer 5.01 (Windows 2000 RC2, build
                    5.00.2128)
   5.00.2919.6307   Internet Explorer 5.01
   5.00.2920.0000   Internet Explorer 5.01 (Windows 2000, build 5.00.2195)
   5.50.3825.1300   Internet Explorer 5.5 Developer Preview (Beta)
   5.50.4030.2400   Internet Explorer 5.5 & Internet Tools Beta
NOTE: All versions of Internet Explorer 5 customized with the Internet Explorer Administration Kit (IEAK) include one of the following strings after the version number when you click About on the Help menu:

   IC = Internet Content Provider
   IS = Internet Service Provider
   CO = Corporate Administrator
NOTE: Some versions of Internet Explorer 4 do not display sub-build numbers when you click About Internet Explorer on the Help menu. Platform Preview versions of Internet Explorer 4.0 are pre-release public betas. To determine the version of Internet Explorer that is currently installed on your computer, use any of the following methods:
Determining the Version of Internet Explorer Using the User Interface

In all versions of Internet Explorer, click About Internet Explorer on the Help menu. The product and version information is displayed in the dialog box that appears.


Determining the Version of Internet Explorer Using the Registry

You can obtain the version of Internet Explorer you are running by viewing the following registry key:
HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer
If a "Version" value appears in this key, Internet Explorer 4.0 or later is installed. The "Version" string value contains the version of Internet Explorer 4.0 or later that is installed on your computer (for example, the Version string value for Internet Explorer 5 is "5.00.2014.0216").

Internet Explorer 3.x does not add the "Version" value to the registry. Instead, it adds a "Build" value to the same registry key and updates the "IVer" string value to "103." For backwards compatibility, Internet Explorer 4.0 and later modifies or adds the "Build" value. For Internet Explorer 3.x, the "Build" value is a string that contains the four- character build number (for example, "1300" for Internet Explorer 3.02). For Internet Explorer 4.0 and later, the "Build" value is a string that contains a five-character value that uses the following format:
major version.build number.sub-build number
For example, the "Build" value for Internet Explorer 5 is "52014.0216".

Internet Explorer 1.0 for Windows 95 (included with Microsoft Plus!) does not add the "Version" or "Build" values to the registry. Instead, it adds an "IVer" value to the same registry key and sets the string value to "100." Internet Explorer 2.0 for Windows 95 adds the "Build" value (which it sets to "520"), and updates the "IVer" string value to "102." Versions of Internet Explorer included with Windows NT 4.0 do not add the "Build" value to the registry, but they do update the "IVer" string value to "101."

If none of these values are in the registry, Internet Explorer is not installed properly or at all.

NOTE: You can also use the registry to determine the version of Internet Explorer that is restored if you uninstall Internet Explorer 4.x. For information about how to do so, please see the following article in the Microsoft Knowledge Base:
Q165871 How to Determine Your Previous Version of Internet Explorer



Determining the Version of Internet Explorer Using the Shdocvw.dll File

For Internet Explorer 3.0 and later, the browser is implemented in the Shdocvw.dll (Shell Document Object and Control Library) file. You can use the version of the Shdocvw.dll file to determine the version of Internet Explorer that is installed on your computer. To do so, follow these steps:


Click Start, point to Find, and then click Files Or Folders.


In the Named box, type shdocvw.dll, and then click Find Now.


In the list of files, right-click the Shdocvw.dll file, and then click Properties.


Click the Version tab.


The following chart lists the different versions of the Shdocvw.dll file and the corresponding versions of Internet Explorer:

      Version         Product
      --------------------------------------------------------------
      4.70.1155       Internet Explorer 3.0
      4.70.1158       Internet Explorer 3.0 (OSR2)
      4.70.1215       Internet Explorer 3.01
      4.70.1300       Internet Explorer 3.02 and 3.02a
      4.71.1008.3     Internet Explorer 4.0 PP2
      4.71.1712.5     Internet Explorer 4.0
      4.72.2106.7     Internet Explorer 4.01
      4.72.3110.3     Internet Explorer 4.01 Service Pack 1
      4.72.3612.1707  Internet Explorer 4.01 SP2
      4.72.3711.2900  Internet Explorer 4.x with Update for "Server-side
                      Page Reference Redirect" Issue installed.
      5.00.0518.5     Internet Explorer 5 Developer Preview (Beta 1)
      5.00.0910.1308  Internet Explorer 5 Beta (Beta 2)
      5.00.2014.213   Internet Explorer 5
      5.00.2314.1000  Internet Explorer 5 (Office 2000)
      5.00.2516.1900  Internet Explorer 5.01 (Windows 2000 Beta 3, build
                      5.00.2031)
      5.00.2614.3500  Internet Explorer 5 (Windows 98 Second Edition)
      5.00.2717.2000  Internet Explorer 5 with Update for "Malformed
                      Favorites Icon" Security Issue installed
      5.00.2721.1400  Internet Explorer 5 with Update for "ImportExport
                      Favorites()" Security Issue installed
      5.00.2723.2900   Internet Explorer 5.0 with Update for "Server-side
                      Page Reference Redirect" Issue installed.
      5.00.2919.800    Internet Explorer 5.01 (Windows 2000 RC1, build
                      5.00.2072)
      5.00.2919.3800   Internet Explorer 5.01 (Windows 2000 RC2, build
                      5.00.2128)
      5.00.2919.6307   Internet Explorer 5.01
      5.00.2919.6400   Internet Explorer 5.01 with Update for "Server-side
                      Page Reference Redirect" Issue installed.
      5.00.2920.0000   Internet Explorer 5.01 (Windows 2000, build
                       5.00.2195)
      5.50.3825.1300   Internet Explorer 5.5 Developer Preview (Beta)
      5.50.4030.2400   Internet Explorer 5.5 & Internet Tools Beta
NOTE: The Windows 2000 File Properties dialog box only displays one zero for portions of the version number that are all zeros (for example: 5.00.2920.0000 is displayed as 5.0.2920.0).

The Shdocvw.dll file is installed in the Windows\System folder in Windows 95, and in the Winnt\System32 folder in Windows NT. If the Shdocvw.dll file does not exist, Internet Explorer 3.0 or later is not installed properly or at all.


Determining the Version of Internet Explorer Using a Script

All versions of Internet Explorer send version information in the Hypertext Transport Protocol (HTTP) user agent information header. This information can be read from script on a Web page. For information about how to use a script to obtain the version of Internet Explorer someone is using, please see the following article in the Microsoft Knowledge Base:
Q167820 HOWTO: Determining Browser Version from a Script
Web page developers can use this information to take advantage of new features in later versions of Internet Explorer (for example, Dynamic Hypertext Markup Language [HTML] or Channels in Internet Explorer 4.x), and degrade gracefully for earlier versions of Internet Explorer that do not support these features.

NOTE: Internet Explorer version 3.02a can be distinguished from version 3.02 by the presence of "update a" in the user agent.


Identifying 128-Bit Versions of Internet Explorer

To determine if you are running the 128-bit strong encryption version of Internet Explorer 3.x or 4.x, check the properties of the Schannel.dll file. To do so, follow these steps:

NOTE: If you are running Internet Explorer 4.01 or later, click About Internet Explorer on the Help menu to determine if the 128-bit or 40-bit version of the Schannel.dll file is installed.


Click Start, point to Find, and then click Files Or Folders.


In the Named box, type schannel.dll, and then click Find Now.


In the list of files, right-click the Schannel.dll file, and then click Properties.


Click the Version tab.


For the 40-bit or Server Gated Cryptography (SGC) version of the Schannel.dll file, "PCT/SSL Security Provider (Export Version)" is the description.

For the 128-bit version of the Schannel.dll file, "PCT/SSL Security Provider (US and Canada Use Only)" is the description.

Note that the version number of the Schannel.dll file is the same for 40-bit, SGC, and 128-bit versions; only the file description is different.

For additional information about the SGC version of the Schannel.dll file, please see the following article in the Microsoft Knowledge Base:
Q148427 Generic SSL (PCT/TLS) Updates for IIS and MS Internet Products
For information about how Internet Explorer 4.0 updates the Schannel.dll file, please see the following article in the Microsoft Knowledge Base:
Q174494 Internet Explorer 4 or 5 Setup Updates 128-Bit Encryption



For additional information about 128-bit strong encryption in Internet Explorer, visit the following Microsoft Web page:
http://www.microsoft.com/ie/
Internet Explorer for Macintosh or Windows 3.1
In Internet Explorer, click About Internet Explorer on the Help menu. On the Macintosh, click About Internet Explorer on the Apple menu. The version number is displayed in the dialog box that appears. Possible version numbers include:

   Windows 3.1   Macintosh
   -----------------------
   2.0           2.0
   2.01          2.1
   2.1           3.0
   3.0           3.0a
   3.0a          3.01a
   3.01          4.0
   3.02a         4.5
   4.0
   5
NOTE: If the version number is 3.0, you should also check the build number next to the version number. To determine if you are running the 128-bit strong encryption version of Internet Explorer for Macintosh, click About Internet Explorer on the Apple menu, and then click Support. The Encryption box should contain the current encryption level. Examples include:
40 Bit International/Export Version


128 Bit US Domestic (Not for Export)


Another way to determine if you are running the 128-bit strong encryption version is to Get Info on one of the following files (depending on your processor family: Power PC or 68xxx) and examine the version information:
System Folder:Extensions:MS Library Folder:MS Internet Library (PPC)


System Folder:Extensions:MS Library Folder:MS Internet Library (68K)


Internet Explorer for UNIX on Sun Solaris
To determine the version of Internet Explorer that is currently installed on your computer, use the following steps:
At the Terminal window, type the path to the installed Internet Explorer files. The default path is /usr/local/microsoft/.


At the prompt, type cd /user/local/microsoft/ie4/sunos, and then press ENTER.


Type ls -i libschannel.so., and then press ENTER.


Compare the file information to the following chart to determine the version of Internet Explorer that is currently installed on your computer.

   Version         Size       Product
   ---------------------------------------------------------
   4.71.1410.4     227,564    Internet Explorer 4.01 40-bit
   4.71.1410.4     227,656    Internet Explorer 4.01 128-bit




Additional query words: 1.00 2.00 3.00 4.00 5.00 current determine sms kbfaqw98w2k

Keywords : msiew95 msient msiew31 msiemac msieunix win98 msiew98 win98se
Version : MACINTOSH:; UNIX:; WINDOWS:2000; Win98:5.01
Platform : MACINTOSH UNIX WINDOWS Win98
Issue type : kbhowto
Technology :


Last Reviewed: April 6, 2000
) 2000 Microsoft Corporation. All rights reserved. Terms of Use.
 



--------------------------------------------------------------------------------
Send feedback to MSDN.Look here for MSDN Online resources.
Avatar of gelog
gelog

Hi,

Below is a source of my class module:

Private Declare Function GetFileVersionInfoSize Lib "version.dll" Alias "GetFileVersionInfoSizeA" (ByVal lptstrFilename As String, lpdwHandle As Long) As Long
Private Declare Function GetFileVersionInfo Lib "version.dll" Alias "GetFileVersionInfoA" (ByVal lptstrFilename As String, ByVal dwHandle As Long, ByVal dwLen As Long, ByVal lpData As Long) As Long


Enum IE_VERSIONS
    INET_DLL_VERSION_ERROR_UNKNOWN = 0
    INET_DLL_VERSION_ERROR_NO_RESOURCE_SECTION = 1
    INET_DLL_VERSION_ERROR_FILE_NOT_FOUND = 2
    IE_VER_UNKNOWN = 3
    IE_VER_3_0          'IE 3.0
    IE_VER_3_01         'IE 3.01
    IE_VER_3_02         'IE 3.02
    IE_VER_3_02_PLUS    'IE 3.02+
    IE_VER_3_02_S       'IE 3.02*
    IE_VER_3_02_SS      'IE 3.0**
    IE_VER_4_0          'IE 4.0
    IE_VER_4_01         'IE 4.01
    IE_VER_4_01_SP1     'IE 4.01 SP1
    IE_VER_5_0          'IE 5.0
End Enum

Private p_IEVersion As IE_VERSIONS
Private p_strDllVersion As String

Private Sub Class_Initialize()

    Dim lSize As Long
    Dim lHandle As Long
    Dim strBuffer As String
    Dim lRetVal As Long
   
    lSize = GetFileVersionInfoSize("wininet.dll", lHandle)
   
    If lSize = 0 Then
        Select Case Err.LastDllError
            Case 2
                p_IEVersion = INET_DLL_VERSION_ERROR_FILE_NOT_FOUND
            Case 1812
                p_IEVersion = INET_DLL_VERSION_ERROR_NO_RESOURCE_SECTION
            Case Else
                p_IEVersion = INET_DLL_VERSION_ERROR_UNKNOWN
        End Select
    Else
        strBuffer = Space(lSize)
        lRetVal = GetFileVersionInfo("wininet.dll", 0&, lSize, StrPtr(strBuffer))
        If lRetVal > 0 Then
            Dim intStartPosition As Integer
            intStartPosition = InStr(1, strBuffer, "ProductVersion") + Len("ProductVersion ")
            p_strDllVersion = Mid$(strBuffer, intStartPosition, InStr(intStartPosition, strBuffer, Chr(0)) - intStartPosition)
            Select Case p_strDllVersion
                Case "4.70.1155"
                    p_IEVersion = IE_VER_3_0
                Case "4.70.1215"
                    p_IEVersion = IE_VER_3_01
                Case "4.70.1300"
                    p_IEVersion = IE_VER_3_02
                Case "4.70.1323"
                    p_IEVersion = IE_VER_3_02_PLUS
                Case "4.70.1434"
                    p_IEVersion = IE_VER_3_02_S
                Case "4.70.1439"
                    p_IEVersion = IE_VER_3_02_SS
                Case "4.71.1712.5"
                    p_IEVersion = IE_VER_4_0
                Case "4.72.2106.5"
                    p_IEVersion = IE_VER_4_01
                Case "4.72.3110.0"
                    p_IEVersion = IE_VER_4_01_SP1
                Case "5.00.2014.213", "5.00.2314.1003"
                    p_IEVersion = IE_VER_5_0
                Case Else
                    p_IEVersion = IE_VER_UNKNOWN
            End Select
        End If
    End If
   
End Sub

Property Get DllVersion() As String
    DllVersion = p_strDllVersion
End Property

Property Get IEVersion() As IE_VERSIONS
    IEVersion = p_IEVersion
End Property

The IEVersion property returns the version of IE.

Welcome to http://www.vbip.com
ASKER CERTIFIED SOLUTION
Avatar of jasonboetcher
jasonboetcher

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
VBGuru,

I been noticing recently that you have been posting microsoft articles in their entirety... In the future, please post only the Title and URL to the microsoft document...

Posting the entire document is a copyright violation and could get EE into trouble with microsoft... Besides, microsoft documents are technically reviewed and changed periodically.  Anyone buying a question from the PAQ will get a link to the latest MS information instead of a static posting...


Cheers!®©
mcrider
>>>I been noticing recently that you have been posting microsoft articles in their entirety... In the future, please post only the Title and URL to the microsoft document...

I belive that the information given in the MSDN CD is not copy righted. In any case I am not altering its content. I am pating as is. I search the MSDN not the microsoft site. As going to Microsoft site will take a longer time to and get the result. So it becomes difficult to get the url to the article.


>>>>Besides, microsoft documents are technically reviewed and changed periodically.  Anyone buying a question from the PAQ will get a link to the latest MS information instead of a static

As you know every article will have a ID associated with it. so if someone is really need the updated info I think he can use the ID as a serach criteria to get the things done.

VBGuru,

>>I belive that the information given in the MSDN CD is not copy righted...

Take a look at the last couple of lines you posted from microsoft's article:

   "Last Reviewed: April 6, 2000
   © 2000 Microsoft Corporation. All rights reserved. Terms of Use. "


This is the Terms of use from microsoft concerning MSDN and their website:
http://support.microsoft.com/support/misc/cpyright.asp 

It really is a no-no... and is also against the EE User Agreement.


Avatar of jamestse

ASKER

I accept jasonboetcher comment. That answer is great and help me.

Must thanks to VBGuru's comment. Our comment is very informative. So sorry to make you into trouble for my question.

Also must thanks to gelog's comment, Your comment is also workable and helpful.

I would like to ask how can I get the language version (English, Traditional Chinese , etc) of the Internet Explorer in Visual Basic. Would somebody teach me ?thanks.