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.
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")
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.
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” )