Simple Analysis to return the value of a key on Windows servers

I am working on a simple Analysis to return the value of a key on Windows servers. The big thing is that the guid for each version is different so I need to look for several keys and return the “DisplayVersion” key value. I would like to look at the guid for several versions and return the value so I need a OR statement. This is what I have for a single version value, and it works to return the value of one GUID.

unique values of (it as string) of values “DisplayVersion” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{EA83ED79-E1E7-4C7E-8B92-8DD2B2634FC9}” of (x64 registries; x32 registries)

the second value is located in key:
“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{554BE59C-56FA-485D-B8C9-7EAC54CB43DD}”

If I can get all the DisplayVersions in a single column that would be grand. I think it can be done with an OR.

Hello fcruson,

You might try something like this:

values "DisplayVersion" of keys whose(value "DisplayName" of it as string as lowercase contains "<name1>" OR value "DisplayName" of it as string as lowercase contains "<name2>") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of (x64 registries; x32 registries)

Simply substitute <name1> and <name2> with values of DisplayName, corresponding to your DisplayVersion values.

Regards,
Vitaliy

1 Like

@vnovik beat me to it, and we usually prefer that form where the DisplayName (or a view options of it) are known, but the ProductGUID is not.

For completeness, if you know a few GUIDs but not the product name (unlikely, I know), you could use something like the form of

values "DisplayVersion" of keys ("{554BE59C-56FA-485D-B8C9-7EAC54CB43DD}";"{EA83ED79-E1E7-4C7E-8B92-8DD2B2634FC9}") of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registries; x64 registries)
1 Like

YES, this works!!!
Thanks everyone for the code. Much easier to get the information we need