I thought this was simple so i guess i am doing something wrong.
I want to read the value of an item in the registry.

the value im after is the centralprofile key which im trying to get by passing the SID and looking up the subkey but it never returns anything.

my code

Function getprofilepath(ByVal SID As String) As String
            regKey = Registry.LocalMachine.OpenSubKey("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\" & SID, False)
            If Not regKey Is Nothing Then
                Return CType(regKey.GetValue("CentralProfile"), String)
            End If
        Catch ex As Exception

        End Try

        Return ""
    End Function

I know that the SID being passed is correct so any thoughts are appreciated.