Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check IE Version via VB.NET Code

Status
Not open for further replies.

ChadJK

IS-IT--Management
Nov 10, 2005
14
0
0
US
How can I programmatically check what version of Internet Explorer is installed on a desktop. When my app launches if I simply want it to check what version of IE the user has and if it's not the one (or ones) I specify then pop a message and exit.
 
Two ways that crossed my mind:

1. Read the Windows Registry. It is located in HKLM\SOFTWARE\Microsoft\Internet Explorer.

2. In the machine that I am using, IExplore.exe is located in "C:\Program Files\Internet Explorer\IEXPLORE.EXE"

Code:
Dim IEexe As String = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"

Dim sinfo As FileVersionInfo
Dim strInfo As FileVersionInfo = FileVersionInfo.GetVersionInfo(IEexe)
MsgBox(strInfo.FileVersion)

Hope this helps.
 
Two ways that crossed my mind:

1. Read the Windows Registry. It is located in HKLM\SOFTWARE\Microsoft\Internet Explorer.

2. In the machine that I am using, IExplore.exe is located in "C:\Program Files\Internet Explorer\IEXPLORE.EXE"

Code:
Dim IEexe As String = "C:\Program Files\Internet Explorer\IEXPLORE.EXE"

Dim strInfo As FileVersionInfo = FileVersionInfo.GetVersionInfo(IEexe)
MsgBox(strInfo.FileVersion)

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top