This example shows how to enumerate the user keys in HKEY_USERS

Public Sub OutputRegKey(Key As RegistryKey)
Imports Microsoft.Win32

Public Class Form1
  Public arrUsers(100) As String, arrUsersMax As Integer = 0

  Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    Dim i As Integer
    Dim txt As String = ""

    '-------------------------------------------------------------------
    ' identify the HKEY_Users
    '-------------------------------------------------------------------
    arrUsers(0) = ".DEFAULT"

    Dim regkey As RegistryKey = Registry.Users.OpenSubKey("")
    EnumerateHkeyUsers(regkey)
    regkey.Close()

    For i = 0 To arrUsersMax
      txt += arrUsers(i) & vbCrLf
    Next

    MsgBox(txt)
    End
  End Sub

  Sub EnumerateHkeyUsers(ByVal rkey As RegistryKey)
    Dim names As String() = rkey.GetSubKeyNames()
    Dim txt As String = ""

    For Each subkey In names
      txt = subkey.ToString

      If Len(txt) > 10 And InStr(LCase(txt), "_classes") = 0 Then
        arrUsersMax = arrUsersMax + 1
        arrUsers(arrUsersMax) = txt
      End If
    Next
  End Sub

End Class