cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Alex_W
Level 6

Searching Registry for keys?

Hi

Project Type: InstallScript MSI

I’m looking for a suggestion on how I would do this. Under myApp registry key there is a Connections key with subkeys that are user defined. So under Connections there could be MyOffice, YourOffice, SomePlace, each with connection string. I know where the “Connections” key is but I want the connection data from each of the user created subkeys. Its seems that all of the build in registry command (unless I’m reading it wrong or missed something which is very likely) require a key name and return a value. But how do I search for all keys under a specified key?

Thanks for any suggestions.
Labels (1)
0 Kudos
(2) Replies
bdshan
Level 4

Look in the help for registry functions. There is one the will enumerate all sub keys and/or values of a given key. I don't have access to the installscript reference right now or I'd give you the function name.

The function returns a LIST, so you would need to iterate thru the LIST to get the data stored in each key.

[EDIT]
Found it...

The RegDBQueryKey function allows users to query a key for its subkeys and value names. The keys can be enumerated dynamically at run time using this function. RegDBQueryKey is a general registry-related function, designed to work with all registry keys, including those handled by the special registry-related functions.

[/EDIT]
0 Kudos
Alex_W
Level 6

Thanks! RegDBQueryKey() is just want Im looking for.
0 Kudos