Relevance Based on a Particular Computer Model

(imported topic written by jwm91)

I am trying to create a fixlet that will only be relevant on a Dell Optiplex 755 system. Any idea how this can be done?

(imported comment written by MattBoyd)

This should get it done:

if (exists wmi) then ((string value of selects "Model from Win32_ComputerSystem" of wmi) as trimmed string as lowercase = "optiplex 755") else (false)

(imported comment written by jwm91)

Thanks for the reply, I will try it

(imported comment written by jwm91)

This is my relevance statement:

((name of it = “WinXP”) of operating system) and if (exists wmi) then ((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex 755”) else (false)

It is still picking up other models besides the 755’s

(imported comment written by MrFixit)

Added a set of () around relevance after the “AND”. I generally do this as a general practice to ensure the evaluation is as I expect.

q: ((name of it = “WinXP”) of operating system) and if (exists wmi) then ((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex 755”) else (false)

E: This expression could not be parsed.

q: ((name of it = “WinXP”) of operating system) and (if (exists wmi) then ((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex 755”) else (false))

A: False

T: 0.106 ms

I: singular boolean

(imported comment written by jwm91)

I have the relevance working for the 755 part of it but I can’t seem to get the part of keying on a certain version of a DLL. Here is the relevance statement:

((name of it = “WinXP”) of operating system) and (if (exists wmi) then ((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex 755”) else (false)) AND ((value “ProductVersion” of version block of file “C:\Windows\system32\ati2cqag.dll”) < ")

Any suggestions would be appreciated

(imported comment written by BenKus)

I think you want to add “as string as version” after the filename:

((name of it = “WinXP”) of operating system) and (if (exists wmi) then ((string value of selects “Model from Win32_ComputerSystem” of wmi) as trimmed string as lowercase = “optiplex 755”) else (false)) AND ((value “ProductVersion” of version block of file “C:\Windows\system32\ati2cqag.dll” as string as version) < ")

Ben

(imported comment written by BenKus)

FYI… be careful with the trimmed string inspector in BigFix 7.x:

http://forum.bigfix.com/viewtopic.php?pid=17565#p17565

This will probably work better:

((name of it = “WinXP”) of operating system) and (if (exists wmi) then ((string value of selects “Model from Win32_ComputerSystem” of wmi) as lowercase contains “optiplex 755”) else (false)) AND ((value “ProductVersion” of version block of file “C:\Windows\system32\ati2cqag.dll” as string as version) < ")

Ben