Tom
Tom

Reputation: 79

VB6 Read All Values Under Registry Key

In Visual Basic 6, how can I get all the values of keys under, for example:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

Which would return the following values (depending on user):

"C:\Program Files\Steam\Steam.exe" -silent

"C:\Program Files\Skype\Phone\Skype.exe" /nosplash /minimized

"C:\Program Files\Windows Live\Messenger\msnmsgr.exe" /background

Etc...

As the keys are not constant, I do not know how to read these. Thanks for any help!

Upvotes: 2

Views: 6237

Answers (2)

Carlos Cocom
Carlos Cocom

Reputation: 932

Look at here http://www.thescarms.com/vbasic/registry.aspx that is one excellent article for work with register of windows

Upvotes: 2

Ken White
Ken White

Reputation: 125671

You're looking for the API function RegEnumKeyEx - you can find a VB example at MSDN here

RegEnumKeyEx Function

Enumerates the subkeys of the specified open registry key. The function retrieves information about one subkey each time it is called.

Upvotes: 4

Related Questions