-
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.
-
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
-
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...