I was wondering how I might concatenate the following two relevance statements so that I get a listing of ALL installed/registered applications:
((values “DisplayName” of it, values “DisplayVersion” of it) whose (it as string as lowercase does not contain “Update for Microsoft Office” AND it as string as lowercase does not contain “security update” AND it as string as lowercase does not contain “update for windows xp” AND it as string as lowercase does not contain “hotfix” AND it as string as lowercase does not contain “redistributable” AND it as string as lowercase does not contain “.net”) of keys of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (registry))
((values “DisplayName” of it, values “DisplayVersion” of it) whose (it as string as lowercase does not contain “Update for Microsoft Office” AND it as string as lowercase does not contain “security update” AND it as string as lowercase does not contain “update for windows xp” AND it as string as lowercase does not contain “hotfix” AND it as string as lowercase does not contain “redistributable” AND it as string as lowercase does not contain “.net”) of keys of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (native registry))
(x32 registry; if(x64 of operating system) then (x64 registry) else nothing)
((values “DisplayName” of it, values “DisplayVersion” of it) whose (it as string as lowercase does not contain “Update for Microsoft Office” AND it as string as lowercase does not contain “security update” AND it as string as lowercase does not contain “update for windows xp” AND it as string as lowercase does not contain “hotfix” AND it as string as lowercase does not contain “redistributable” AND it as string as lowercase does not contain “.net”) of keys of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registry; if(x64 of operating system) then (x64 registry) else nothing)
When I run your revised relevance through the fixlet debugger, I get the following syntax error:
A literal value or parenthesized expression was expected before ‘if’
Also, to help clarify, I’m looking to get the information from the Uninstall key for both the x32 AND x64 registry keys, not just one or the other.
Resolved the error, and it looks like your relevance is producing the results I was hoping for.
Here’s the corrected relevance for this interested:
((values “DisplayName” of it, values “DisplayVersion” of it) whose (it as string as lowercase does not contain “Microsoft Office” AND it as string as lowercase does not contain “security update” AND it as string as lowercase does not contain “update for windows xp” AND it as string as lowercase does not contain “hotfix” AND it as string as lowercase does not contain “redistributable” AND it as string as lowercase does not contain “.net”) of keys of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registry; (if (x64 of operating system) then (x64 registry) else nothing)))
As an aside, is there a way to add the “unique” property to the relevance? The unintentional benefit of ordering the results alphabetically would help…
Sorry about that, I was not running this through the debugger.
Try this:
unique values of ((value “DisplayName” of it as string & " - " & value “DisplayVersion” of it as string) whose (it as string as lowercase does not contain “Microsoft Office” AND it as string as lowercase does not contain “security update” AND it as string as lowercase does not contain “update for windows xp” AND it as string as lowercase does not contain “hotfix” AND it as string as lowercase does not contain “redistributable” AND it as string as lowercase does not contain “.net”) of keys of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registry; (if (x64 of operating system) then (x64 registry) else nothing)))
If you don’t need DisplayVersion, you could also do it this way:
unique values of ((value “DisplayName” of it as string) whose (it as string as lowercase does not contain “Microsoft Office” AND it as string as lowercase does not contain “security update” AND it as string as lowercase does not contain “update for windows xp” AND it as string as lowercase does not contain “hotfix” AND it as string as lowercase does not contain “redistributable” AND it as string as lowercase does not contain “.net”) of keys of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registry; (if (x64 of operating system) then (x64 registry) else nothing)))
Q: unique values of ((value “DisplayName” of it as string & " - " & value “DisplayVersion” of it as string) whose (it as string as lowercase does not contain “Microsoft Office” AND it as string as lowercase does not contain “security update” AND it as string as lowercase does not contain “update for windows xp” AND it as string as lowercase does not contain “hotfix” AND it as string as lowercase does not contain “redistributable” AND it as string as lowercase does not contain “.net”) of keys of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registry; (if (x64 of operating system) then (x64 registry) else nothing)))
E: Singular expression refers to nonexistent object.
unique values of ((value “DisplayName” of it as string & " - " & value “DisplayVersion” of it as string) whose (it as string as lowercase does not contain “microsoft office” AND it as string as lowercase does not contain “security update” AND it as string as lowercase does not contain “update for windows xp” AND it as string as lowercase does not contain “hotfix” AND it as string as lowercase does not contain “redistributable” AND it as string as lowercase does not contain “.net”) of keys whose(exists value “DisplayName” of it AND exists value “DisplayVersion” of it) of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registry; (if (x64 of operating system) then (x64 registry) else nothing)))
unique values of ((value “DisplayName” of it as string & " - " & (if (exists value “DisplayVersion” of it) then (value “DisplayVersion” of it as string) else “NoVersion”)) whose (it as string as lowercase does not contain “microsoft office” AND it as string as lowercase does not contain “security update” AND it as string as lowercase does not contain “update for windows xp” AND it as string as lowercase does not contain “hotfix” AND it as string as lowercase does not contain “redistributable” AND it as string as lowercase does not contain “.net”) of keys whose(exists value “DisplayName” of it) of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (x32 registry; (if (x64 of operating system) then (x64 registry) else nothing)))