Multiple reg key value return report

(imported topic written by SystemAdmin)

I am pressed for time on this one, and wanted to post help prior in parellel to creating the relevance lanquage.

I need to report back on the data of 4 valuies in a specific reg key. If the key does not exist, report back “n/a”. I know this is vauge, but we have some real rock-starts on here, and I hope this is enought for some guidance.

I will post what I have so far as I start building the relevance.

Thanks for the help, as always.

(imported comment written by SystemAdmin)

if you want to print the data for all the values in teh key, yo can do this:

if(exists keys 
"HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient" of registry) then (values of keys 
"HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient" of registry) as string 

else (
"N\A")

if you want some specific values and not other, you can just apply a filter to the values like this:

if(exists keys 
"HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient" of registry) then (values whose(name of it =
"Version" OR name of it =
"EnterpriseClientFolder" ) of keys 
"HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient" of registry) as string 

else (
"N\A")

(imported comment written by SystemAdmin)

The first option would be overkill, this particular key has 3 dozen values. I would like to use the second option in a way that would return all 4 values I specify. I am struggling in how to write that.

(imported comment written by SystemAdmin)

I might be able to make the first one work for short term if I can return the key name as well as value name.

(imported comment written by SystemAdmin)

You mean you want the value name along with teh data, for only those 4 values you want? you can do it easily with tuples:

if ( exists keys 
"HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient" of registry ) then ( ( ( name of it, it ) as string ) of values whose ( name of it =
"Version" OR name of it =
"EnterpriseClientFolder" ) of keys 
"HKEY_LOCAL_MACHINE\SOFTWARE\BigFix\EnterpriseClient" of registry ) as string 

else ( 
"N\A" )

just replace this section with the names of the values you want to return:

(name of it =“Version” OR name of it =“EnterpriseClientFolder” )

-Zak Kus

(imported comment written by SystemAdmin)

Zak

You stud you! that works just fine.

Thank you.

(imported comment written by SystemAdmin)

So,

I have this built and it works great, however one of the values I need returned is a DWORD. How would I do this?