I am trying to setup a small function to get the version of the default internet browser. Here is my code:

VB Code:
  1. Imports Microsoft.Win32
  2. Imports System.Environment
  3.  
  4. Private Sub GetDefBrowser()
  5.  
  6.  Dim DefBrowser As String
  7.  Dim IEVersion As String
  8.        
  9. DefBrowser = Registry.ClassesRoot.GetValue("HKEY_CLASSES_ROOT\HTTP\shell\open\command").ToString
  10.        
  11. IEVersion = System.Diagnostics.FileVersionInfo.GetVersionInfo(DefBrowser).ProductVersion.ToString()
  12.  
  13. Label1.text = IEVersion
  14.  
  15. 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