Question regarding custom fixlet

(imported topic written by Robert91)

I am trying to build a custom fixlet that looks at two items:

  1. Is hardware a laptop

  2. Does file exist

I am having a hard time creating the revelence for this. This is what I have:

if (exists wmi) then ((exists selects “* from win32_Battery” of wmi OR exists string value whose (it as lowercase contains “laptop”) of selects “ChassisTypes from Win32_SystemEnclosure” of wmi ) as string) else (“N/A”) and exists (file “C:\Program Files\MEM Proxy\proxysettings.exe”)

The first part - I got from the site manager properties and I created the second part which works with the QNA, but putting them together gives an error:

Q: if (exists wmi) then ((exists selects “* from win32_Battery” of wmi OR exists string value whose (it as lowercase contains “laptop”) of selects “ChassisTypes from Win32_SystemEnclosure” of wmi ) as string) else (“N/A”) and exists (file “C:\Program Files\MEM Proxy\proxysettings.exe”)

E: A boolean expression is required.

Any help would be appreciated.

-Robert

(imported comment written by jessewk)

This is for fixlet relevance? In that case you need to adapt the battery relevance so that it returns a boolean true or false, instead of the strings “N/A” or “True”

Thats easy:

exists wmi AND (exists selects “* from win32_Battery” of wmi OR exists string value whose (it as lowercase contains “laptop”) of selects “ChassisTypes from Win32_SystemEnclosure” of wmi )

All you need to do now is add your file relevance:

exists wmi AND (exists selects “* from win32_Battery” of wmi OR exists string value whose (it as lowercase contains “laptop”) of selects “ChassisTypes from Win32_SystemEnclosure” of wmi ) AND exists file “C:\Program Files\MEM Proxy\proxysettings.exe”