0

I want to search the registry to see if key names exist. One location is HKEY_CLASSES_ROOT\CLSID. I used the RegistryKey.GetSubKeyNames to do my search, and the following code to verify it was working.

Dim key1 As RegistryKey = Registry.ClassesRoot.OpenSubKey("CLSID")
Dim key1SubKeySearch As String = String.Empty
For Each key1SubKeySearch In key1.GetSubKeyNames
        MsgBox(key1SubKeySearch)
Next

I thought I might be having the problem of this user: Registry GetSubKeyNames() lists different keys than Regedit? I tried his suggestion but it doesn't work either...

classesRootBase = RegistryKey.OpenBaseKey(RegistryHive.ClassesRoot, RegistryView.Default)

I still have missing results. I'm not sure what view I'm supposed to choose, perhaps that's causing my issue.

Community
  • 1
  • 1
user287848
  • 141
  • 1
  • 12

0 Answers0