Results 1 to 3 of 3

Thread: How can I loop trough the regestery

  1. #1

    Thread Starter
    Addicted Member jeroenh's Avatar
    Join Date
    Aug 2000
    Location
    Rotterdam, Holland
    Posts
    201
    Hi there,

    I'm building a program and need to loop trough the registery and I need to access the regestery with API calls. I now how the API part works, but how do I make a loop if it when I need different branches and string from the regestery.

    Can anybody help me.
    Catch you later,

    Jeroen Hoekemeijer
    Code:
    If 1 = 2 Then MajorError

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Using my registry module which you can download on my homepage, you can iterate trough all items ans subkeys in a key.
    Code:
    sub Main()
        SearchKey "HKEY_CLASSES_ROOT"
        SearchKey "HKEY_CURRENT_USER"        
        SearchKey "HKEY_LOCAL_MACHINE"
        SearchKey "HKEY_USERS"
        SearchKey "HKEY_CURRENT_CONFIG"
    End sub
    
    Sub SearchKey(Key):Dim n
       For each n in subkeys(Key)'Iterate trough each subkey
          SearchKey(n)'and search it too
       Next n
       For each n in keyvalues(Key)
          'Do whatever you want, for instance adding the value to a listbox
          list1.additem Key & "\" & n
       Next n
    End sub
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3
    Fanatic Member crispin's Avatar
    Join Date
    Aug 2000
    Location
    2 clicks west of a Quirkafleeg...Cornwall, England
    Posts
    754
    Microsoft produced a Regobj.dll for developers exposing properties and methods to allow easy registry manipulation, you can get it at

    http://msdn.microsoft.com/vbasic/downloads/addon.asp

    or you can mail me for it



    If anyone has used it extensively and has found it to be cr*p then lemme know...
    Crispin
    VB6 ENT SP5
    VB.NET
    W2K ADV SVR SP3
    WWW.BLOCKSOFT.CO.UK

    [Microsoft Basic: 1976-2001, RIP]

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