I am trying to setup a small function to get the version of the default internet browser. Here is my code:
VB Code:
Imports Microsoft.Win32 Imports System.Environment Private Sub GetDefBrowser() Dim DefBrowser As String Dim IEVersion As String DefBrowser = Registry.ClassesRoot.GetValue("HKEY_CLASSES_ROOT\HTTP\shell\open\command").ToString IEVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(DefBrowser).ProductVersion.ToString() Label1.text = IEVersion end sub
I keep getting this error on the GetValue statement:
{"Object reference not set to an instance of an object."}
I have verified what is there in the registry:
(Default) REG_SZ "C:\Program Files\Internet Explorer\IEXPLORE.EXE" -nohome
What am i doing incorrectly or missing??
Thank you in advance,
Dminder




Reply With Quote