Results 1 to 3 of 3

Thread: Registry enumeration - Easy, I think.

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119

    Registry enumeration - Easy, I think.

    I would like to open a registry key, then enumerate through all its values. Need to get the value name as well as the value data. Probably an easy one....

    Thanks in advance!

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    I don't use VB.Net, but in VB6 you would use the RegEnumKeyEx API call, i'm sure you can find an example for .net

  3. #3
    Registered User
    Join Date
    Nov 2002
    Location
    Växjö, Sweden
    Posts
    314
    Example (requires an Imports Microsoft.Win32):

    Code:
    Dim regClsID As RegistryKey = Registry.ClassesRoot.OpenSubKey("CLSID")
    Dim clsid As String
    For Each clsid In regClsID.GetSubKeyNames
        Dim regClsIDKey As RegistryKey = regClsID.OpenSubKey(clsid)
        MsgBox(clsid.ToString & ", " & CStr(regClsIDKey.GetValue("")))
    Next
    Returns quite a few rows here, but I think you see the point.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width