Relevance help with registry

(imported topic written by jpeppers91)

I’m trying to write a relevance statement and running into a snag. This statement pulls what I’m looking for but I’m trying to filter it more.

((values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Citrix Hotfix Rollup Pack” of it) of it) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry)

Citrix Hotfix Rollup Pack PSE450W2K3R01

Citrix Hotfix Rollup Pack PSE450W2K3R02

Citrix Hotfix Rollup Pack PSE450W2K3R03

Citrix Hotfix Rollup Pack PSE450W2K3R04

Citrix Hotfix Rollup Pack PSE450W2K3R05

Citrix Hotfix Rollup Pack PSE450W2K3R06

I’m trying to incorporate where if the “System Component” key is not found then display that registry key for that key.

(imported comment written by Lee Wei)

Here you go:

((values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Microsoft” of it) of it and not exists value “SystemComponent” of it) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry)

Lee Wei

(imported comment written by Lee Wei)

Oops, please remove the asterisks “*” from the statement.

Lee Wei

(imported comment written by jpeppers91)

Thanks. I’m trying to encompass the 64 bit node as well and I’m getting an error on the “OR”

(values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Citrix Hotfix Rollup Pack” of it) of it and not exists value “SystemComponent” of it) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry or exists(values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Citrix Hotfix Rollup Pack” of it) of it and not exists value “SystemComponent” of it) of key “HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall” of native registry

(imported comment written by Lee Wei)

“OR” is a Boolean function. So it only works if you are dealing with True/False values.

Looks like you have 2 lists of values and you want to combine them together.

Use the “;” to combine the output of 2 lists.

(values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Citrix Hotfix Rollup Pack” of it) of it and not exists value “SystemComponent” of it) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry; (values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Citrix Hotfix Rollup Pack” of it) of it and not exists value “SystemComponent” of it) of key “HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall” of native registry

Lee Wei

(imported comment written by jpeppers91)

Is there a way to display without error: non-existent object?

(imported comment written by Lee Wei)

We will have to find out where the “Singular expression refers to nonexistent objects” might be coming from.

Is it possible that you are running against some 32-bit systems without the WOW6432Node registry hive?

If so, we can put an IF statement to do that only on 64-bit systems as follows.

(if (x64 of operating system) then ((values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Citrix Hotfix Rollup Pack” of it) of it and not exists value “SystemComponent” of it) of key “HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall” of native registry) else (nothing))

So the combined statement would be.

(values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Citrix Hotfix Rollup Pack” of it) of it and not exists value “SystemComponent” of it) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry; (if (x64 of operating system) then ((values “DisplayName” of it) of keys whose (exists value “DisplayName” whose (it as string contains “Citrix Hotfix Rollup Pack” of it) of it and not exists value “SystemComponent” of it) of key “HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall” of native registry) else (nothing))

Lee Wei