Specific Installed Applications

Having trouble with an analysis for specific installed applications. I tried to alter this relevance code below but it’s not filtering out just Commvault. It’s giving me everything on the server. How do I get just a few applications? I want to get BigFix, Commvault, Puppet, AMP.

(if it = “” then nothing else it) of unique values of ((if (exists value"DisplayName" of it AND exists value “DisplayName” of it as string) then (value “DisplayName” of it as string) else ("")) & (if (exists value “DisplayVersion” of it AND exists value “DisplayVersion” of it as string) then (" | " & value “DisplayVersion” of it as string) else (""))) of keys whose (exists value “UninstallString” of it AND ((not exists value “SystemComponent” of it) OR (exists value “SystemComponent” of it AND name of it starts with “{” AND name of it contains “}” AND name of it contains “commvault” AND (exists match (regex “(9|A|B|C)(0|1)1(2|4)\d\d\d\d-(0011|0012|0013|0014|0017|002E|002F|0030|0031|0033|0035|003A|003B|0044|0051|0052|0053|0057|00BA |00CA|10D7|110D)-(0000|0409)-(0|1)000-(0|1)000000FF1CE$”) of preceding text of first “}” of following text of first “{” of name of it))) AND (if (exists value “DisplayName” of it AND exists value “DisplayName” of it as string) then ((it does not contain “Hotfix” AND it does not contain “Security Update for” AND it does not contain “Update for” AND it does not contain “Security Update for Windows” AND it does not contain “Update for Windows” AND it does not contain “Security Update for Microsoft” AND (length of it > 0) AND (number of substrings " " of it < length of it)) of (value “DisplayName” of it as string)) else true)) of keys “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of (if x64 of operating system then (x32 registry; x64 registry) else registry)

 (
   value "DisplayName" of it as string & "|" & 
   (
     value "DisplayVersion" of it as string | "Version Unknown"
   )
 )
 of keys 
 whose
 (
   exists value "DisplayName" 
   whose
   (
     (
       it contains "bigfix" 
      or
       it contains "commvault" 
      or
       it contains "amp" 
      or
       it contains "puppet"
     )
     of 
     (
       it as string as lowercase
     )
   )
   of it
 )
 of keys "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of 
 (
   x32 registries; x64 registries
 )
1 Like

Thank you. I saw some of your post yesterday but when testing in qna it keeps saying the expression can’t be parsed. Same with the code you provided today. However, when I put it in notepad and took out all the returns it got me what I wanted. One problem I had was using AND instead of OR. Doh!

In the Fixlet Debugger, you can switch to the “Single Clause” tab to evaluate a multi-line piece of Relevance such as this.
There is also a button in Single-Clause to collapse or expand the relevance into a single-line or into multiple lines.

2 Likes