Retrieve all keys and their values under Registry Key

(imported topic written by hbkrules6991)

We use Big Fix to conduct our server inventory. Unforetunealy some things(like server owner) cannot be determine using BF so we have an application that we run that will put this info into the registry. We would then like to use BF to retrieve this info. How, using the registry key below, can we retrieve all the values of all the keys below it. Can it be done with one query? or multiple

HKEY_LOCAL_MACHINE\SOFTWARE\ServerInfo

Examples of keys are

Owner

Function

BackedUP

iLOCard

Location

etc…

Possible?

Thanks…

(imported comment written by jessewk)

Something like this?

(name of it, it) of values of key “HKEY_LOCAL_MACHINE\SOFTWARE\ServerInfo” of registry

(imported comment written by hbkrules6991)

Thanks Jesse exactly what I needed. Since it will be in report format I would love to add the if exists in case it does not exists.

I tried

if exists (name of it, it) of values of key “HKEY_LOCAL_MACHINE\SOFTWARE\ServerInfo” of registry Else “NA”

but I know I did something wrong.

(imported comment written by jessewk)

You have 2 options. If you are okay with the clients reporting nothing in the case where the key doesn’t exist, just make ‘key’ plural:

(name of it, it) of values of keys “HKEY_LOCAL_MACHINE\SOFTWARE\ServerInfo” of registry

Option 2, you can return a string in the case where the key doesn’t exist:

if (exist key “HKEY_LOCAL_MACHINE\SOFTWARE\ServerInfo” of registry ) then (it as string) of (name of it, it) of values of keys “HKEY_LOCAL_MACHINE\SOFTWARE\ServerInfo” of registry else “No Key”

I personally perfer the first one format because it’s easier to read and a little more efficient for the client, server, and console. However, reporting requirements often lead people to the second format (which really doesn’t cause that much more load).

(imported comment written by hbkrules6991)

Excellent, either one provides exactly what I need. thanks again!