WMI Values that do not contain

I’m trying to code relevance on a display driver fixlet to only make it applicable if a certain version of display driver (for that model) is NOT installed. Here’s what I need essentially:

q: unique values of ((string values of property "DriverVersion" of it) of ((select object "DriverVersion, DeviceClass from Win32_PnPSignedDriver" of wmi) whose (string value of property "DeviceClass" of it as uppercase contains "DISPLAY"))) does not contain "10.18.14"
E: A singular expression is required.

I can see why the error is happening, as essentially I am saying “values does not contain” when I should be saying “value does not contain”… but how do I get the result I need for machines that have multiple video driver values?

Adjust the wmi statement so it just sends back the items you want instead of getting everything and filtering with relevance

unique values of (string values of property "DriverVersion" of it) of (select objects "DriverVersion, DeviceClass from Win32_PnPSignedDriver where DeviceClass = 'DISPLAY' and not (DriverVersion like '%2510.18.14%25')" of wmi)

wmi though, so horribly slow (but I guess it doesn’t need to evaluate that often).

Ok, perhaps getting closer. However that query gives me a driver version as the result, when I am looking for a true/false answer, i.e. this task is applicable to this machine (because this driver version is not one of the driver versions installed) or this task is not applicable…

Actually, throwing an “exists” in front of it seems to do the trick:

exists (unique values of (string values of property "DriverVersion" of it) of (select objects "DriverVersion, DeviceClass from Win32_PnPSignedDriver where DeviceClass = 'DISPLAY' and not (DriverVersion like '%2510.18.14%25')" of wmi))
A: False
T: 3215.827 ms

Thank you @trn

Watch out for a couple of gotchas in your relevance. You’re not filtering to a particular display adapter type (so you’ll hit both Nvidia and ATI cards if their driver version is not exactly 10.18.14), and you’re also not looking for “this version or higher” so a system with 11.19.15 would also be relevant.

For the purpose of this post I’m assuming NVidia, but the same applies to all PnP drivers, just swap out the ProviderName, ClassGUID, and DriverVersion values as needed.

I handle my driver relevance a little bit differently. Knowing that the loaded drivers are shown in HKLM\system\CurrentControlSet\Control\Class, and the Display ClassGUID is {4d36e968-e325-11ce-bfc1-08002be10318}, my Relevance would look like

exists keys whose (value "ProviderName" of it as string = "NVidia" and value "DriverVersion" of it as string as version < version "10.18.14") of keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}" of registry

To take it a leap forward, and account for the fact that NVidia drops support for older devices in their newer drivers, I want to get a list of PnP IDs for devices that are still present in the new driver. To do that I extract their driver into a directory and read the PnP IDs from the driver:

To get the list of PnP IDs for a given set of driver INF files:

concatenation ";" of ("%22pci\" & it & "%22") of unique values of (following texts of firsts "PCI\" of lines of find files "*.inf" of folder "c:\temp\Display.Driver" as trimmed string as lowercase)

I paste that result into a Relevance statement that I have pre-canned for each class type and provider - the template statement looks like this. In this statement, we need to replace the ClassGUID values (to switch between Video/Network/etc.), ProviderName, DriverVersion, and the list of PnP IDs (generated in the previous statement)

exists (keys of keys of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI" of native registry) whose ( /* if class is defined then class matches expectation (in this case, "Video"); if no class is listed then its an unknown device and may still be relevant */(if exists (value "ClassGUID" of it) then (/* SUBST CLASS HERE */ value "ClassGUID" of it as string = "{4d36e968-e325-11ce-bfc1-08002be10318}") else true) AND /* if there is no "Driver" key then true, else check the driver present in the "Driver" key */ (if not exists value "Driver" of it then true else (exists (it, /* SUBST CLASS HERE */ keys of key "{4d36e968-e325-11ce-bfc1-08002be10318}" of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class" of native registry) whose (pathname of item 1 of it as lowercase ends with value "Driver" of item 0 of it as string as lowercase AND ( /* wrong Provider */ not exists (value "ProviderName" of item 1 of it) whose (it = "NVIDIA") or ( /* version too low */ not exists (value "DriverVersion" of item 1 of it) whose (it as string as version >= version "22.21.13.8569")))) )) AND ( /* exists a hardware ID matching our expected list from INF*/ exists (substrings separated by "%00" of ((values "CompatibleIDs" of it; values "HardwareID" of it) as string as lowercase as trimmed string)) whose (it != "" and it is contained by set of ("INSERT_PNP_IDS_HERE"))) )

This statement looks for PnP IDs matching the NVidia drives for whatever driver version, found in ENUM\PCI, that either have no driver loaded, have a driver loaded that’s not from NVidia (like default MS SVGA), or have the NVidia driver with a lower version than expected.

In the end, here’s my statement for the relevance I’m using to detect NVidia Quadro 385.69 (driver version 22.21.13.8569). It’s ugly to read, but since it’s mostly generated I don’t mind:

exists (keys of keys of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI" of native registry) whose ( /* if class is defined then class matches expectation (in this case, "Video"); if no class is listed then its an unknown device and may still be relevant */(if exists (value "ClassGUID" of it) then (/* SUBST CLASS HERE */ value "ClassGUID" of it as string = "{4d36e968-e325-11ce-bfc1-08002be10318}") else true) AND /* if there is no "Driver" key then true, else check the driver present in the "Driver" key */ (if not exists value "Driver" of it then true else (exists (it, /* SUBST CLASS HERE */ keys of key "{4d36e968-e325-11ce-bfc1-08002be10318}" of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class" of native registry) whose (pathname of item 1 of it as lowercase ends with value "Driver" of item 0 of it as string as lowercase AND ( /* wrong Provider */ not exists (value "ProviderName" of item 1 of it) whose (it = "NVIDIA") or ( /* version too low */ not exists (value "DriverVersion" of item 1 of it) whose (it as string as version >= version "22.21.13.8569")))) )) AND ( /* exists a hardware ID matching our expected list from INF*/ exists (substrings separated by "%00" of ((values "CompatibleIDs" of it; values "HardwareID" of it) as string as lowercase as trimmed string)) whose (it != "" and it is contained by set of ("pci\ven_10de&dev_06d1";"pci\ven_10de&dev_06d1&subsys_077110de";"pci\ven_10de&dev_06d1&subsys_077210de";"pci\ven_10de&dev_06d2";"pci\ven_10de&dev_06d2&subsys_077410de";"pci\ven_10de&dev_06d2&subsys_083010de";"pci\ven_10de&dev_06d2&subsys_084210de";"pci\ven_10de&dev_06d2&subsys_088f10de";"pci\ven_10de&dev_06d2&subsys_090810de";"pci\ven_10de&dev_06da&subsys_081a1028";"pci\ven_10de&dev_06da&subsys_1520103c";"pci\ven_10de&dev_06de";"pci\ven_10de&dev_06de&subsys_077310de";"pci\ven_10de&dev_06de&subsys_082f10de";"pci\ven_10de&dev_06de&subsys_084010de";"pci\ven_10de&dev_06de&subsys_084210de";"pci\ven_10de&dev_06de&subsys_084610de";"pci\ven_10de&dev_06de&subsys_086610de";"pci\ven_10de&dev_06de&subsys_090710de";"pci\ven_10de&dev_06de&subsys_091e10de";"pci\ven_10de&dev_06df";"pci\ven_10de&dev_06df&subsys_084d10de";"pci\ven_10de&dev_06df&subsys_087f10de";"pci\ven_10de&dev_0dda&subsys_04a31028";"pci\ven_10de&dev_0dda&subsys_14a31028";"pci\ven_10de&dev_0dda&subsys_1631103c";"pci\ven_10de&dev_0dda&subsys_21cf17aa";"pci\ven_10de&dev_0dda&subsys_21d117aa";"pci\ven_10de&dev_0def&subsys_21f317aa";"pci\ven_10de&dev_0def&subsys_21f417aa";"pci\ven_10de&dev_0def&subsys_21f517aa";"pci\ven_10de&dev_0def&subsys_21f617aa";"pci\ven_10de&dev_0def&subsys_21f817aa";"pci\ven_10de&dev_0def&subsys_500517aa";"pci\ven_10de&dev_0dfc&subsys_05341028";"pci\ven_10de&dev_0dfc&subsys_05351028";"pci\ven_10de&dev_0dfc&subsys_15341028";"pci\ven_10de&dev_0dfc&subsys_15351028";"pci\ven_10de&dev_0ff3";"pci\ven_10de&dev_0ff6&subsys_05cc1028";"pci\ven_10de&dev_0ff6&subsys_060d1028";"pci\ven_10de&dev_0ff6&subsys_15cc1028";"pci\ven_10de&dev_0ff6&subsys_17ee10cf";"pci\ven_10de&dev_0ff6&subsys_1909103c";"pci\ven_10de&dev_0ff6&subsys_190a103c";"pci\ven_10de&dev_0ff6&subsys_197a103c";"pci\ven_10de&dev_0ff6&subsys_197b103c";"pci\ven_10de&dev_0ff6&subsys_221017aa";"pci\ven_10de&dev_0ff6&subsys_221117aa";"pci\ven_10de&dev_0ff6&subsys_221a17aa";"pci\ven_10de&dev_0ff6&subsys_221e17aa";"pci\ven_10de&dev_0ff6&subsys_2253103c";"pci\ven_10de&dev_0ff6&subsys_2254103c";"pci\ven_10de&dev_0ff6&subsys_2255103c";"pci\ven_10de&dev_0ff6&subsys_2256103c";"pci\ven_10de&dev_0ff6&subsys_22fa1043";"pci\ven_10de&dev_0ff6&subsys_51061558";"pci\ven_10de&dev_0ff6&subsys_52811558";"pci\ven_10de&dev_0ff6&subsys_71041558";"pci\ven_10de&dev_0ff6&subsys_74811558";"pci\ven_10de&dev_0ff6&subsys_75001558";"pci\ven_10de&dev_0ff6&subsys_77001558";"pci\ven_10de&dev_0ff6&subsys_8104103c";"pci\ven_10de&dev_0ff8&subsys_176a10cf";"pci\ven_10de&dev_0ff9";"pci\ven_10de&dev_0ffa";"pci\ven_10de&dev_0ffb&subsys_053e1028";"pci\ven_10de&dev_0ffb&subsys_10db1462";"pci\ven_10de&dev_0ffb&subsys_153e1028";"pci\ven_10de&dev_0ffb&subsys_175e10cf";"pci\ven_10de&dev_0ffb&subsys_175f10cf";"pci\ven_10de&dev_0ffb&subsys_176b103c";"pci\ven_10de&dev_0ffb&subsys_21f517aa";"pci\ven_10de&dev_0ffb&subsys_21f617aa";"pci\ven_10de&dev_0ffc&subsys_053e1028";"pci\ven_10de&dev_0ffc&subsys_10db1462";"pci\ven_10de&dev_0ffc&subsys_153e1028";"pci\ven_10de&dev_0ffc&subsys_175e10cf";"pci\ven_10de&dev_0ffc&subsys_176b103c";"pci\ven_10de&dev_0ffc&subsys_21f517aa";"pci\ven_10de&dev_0ffc&subsys_21f617aa";"pci\ven_10de&dev_0ffc&subsys_51061558";"pci\ven_10de&dev_0ffc&subsys_71041558";"pci\ven_10de&dev_0ffd";"pci\ven_10de&dev_0ffe";"pci\ven_10de&dev_0fff";"pci\ven_10de&dev_0fff&subsys_094a10de";"pci\ven_10de&dev_1021";"pci\ven_10de&dev_1022";"pci\ven_10de&dev_1023";"pci\ven_10de&dev_1024";"pci\ven_10de&dev_1026";"pci\ven_10de&dev_1027";"pci\ven_10de&dev_1028";"pci\ven_10de&dev_1029";"pci\ven_10de&dev_102a";"pci\ven_10de&dev_102d";"pci\ven_10de&dev_103a";"pci\ven_10de&dev_103c";"pci\ven_10de&dev_1056&subsys_04931028";"pci\ven_10de&dev_1056&subsys_04941028";"pci\ven_10de&dev_1056&subsys_04e41028";"pci\ven_10de&dev_1056&subsys_14931028";"pci\ven_10de&dev_1056&subsys_14941028";"pci\ven_10de&dev_1056&subsys_14e41028";"pci\ven_10de&dev_1056&subsys_163610cf";"pci\ven_10de&dev_1056&subsys_21d217aa";"pci\ven_10de&dev_1056&subsys_21d317aa";"pci\ven_10de&dev_1057&subsys_21ce17aa";"pci\ven_10de&dev_1057&subsys_21cf17aa";"pci\ven_10de&dev_1057&subsys_21d017aa";"pci\ven_10de&dev_1057&subsys_21d117aa";"pci\ven_10de&dev_1057&subsys_c0a6144d";"pci\ven_10de&dev_1057&subsys_c0af144d";"pci\ven_10de&dev_1057&subsys_c0b0144d";"pci\ven_10de&dev_107c";"pci\ven_10de&dev_107c&subsys_102f10de";"pci\ven_10de&dev_107d";"pci\ven_10de&dev_1091";"pci\ven_10de&dev_1091&subsys_088710de";"pci\ven_10de&dev_1091&subsys_088e10de";"pci\ven_10de&dev_1091&subsys_089110de";"pci\ven_10de&dev_1094";"pci\ven_10de&dev_1094&subsys_088810de";"pci\ven_10de&dev_1096";"pci\ven_10de&dev_1096&subsys_091010de";"pci\ven_10de&dev_1096&subsys_091110de";"pci\ven_10de&dev_1140&subsys_220017aa";"pci\ven_10de&dev_118f";"pci\ven_10de&dev_1194";"pci\ven_10de&dev_11b4";"pci\ven_10de&dev_11b6";"pci\ven_10de&dev_11b6&subsys_05cd1028";"pci\ven_10de&dev_11b6&subsys_10fc1462";"pci\ven_10de&dev_11b6&subsys_10fd1462";"pci\ven_10de&dev_11b6&subsys_11521462";"pci\ven_10de&dev_11b6&subsys_118c1462";"pci\ven_10de&dev_11b6&subsys_15cd1028";"pci\ven_10de&dev_11b6&subsys_190a103c";"pci\ven_10de&dev_11b6&subsys_197a103c";"pci\ven_10de&dev_11b6&subsys_2255103c";"pci\ven_10de&dev_11b6&subsys_2256103c";"pci\ven_10de&dev_11b6&subsys_51061558";"pci\ven_10de&dev_11b6&subsys_52811558";"pci\ven_10de&dev_11b6&subsys_71041558";"pci\ven_10de&dev_11b6&subsys_74811558";"pci\ven_10de&dev_11b6&subsys_75001558";"pci\ven_10de&dev_11b6&subsys_77001558";"pci\ven_10de&dev_11b7";"pci\ven_10de&dev_11b7&subsys_05cd1028";"pci\ven_10de&dev_11b7&subsys_11001462";"pci\ven_10de&dev_11b7&subsys_11531462";"pci\ven_10de&dev_11b7&subsys_118d1462";"pci\ven_10de&dev_11b7&subsys_15cd1028";"pci\ven_10de&dev_11b7&subsys_190a103c";"pci\ven_10de&dev_11b7&subsys_197a103c";"pci\ven_10de&dev_11b7&subsys_2255103c";"pci\ven_10de&dev_11b7&subsys_2256103c";"pci\ven_10de&dev_11b8&subsys_02701558";"pci\ven_10de&dev_11b8&subsys_03761558";"pci\ven_10de&dev_11b8&subsys_05cd1028";"pci\ven_10de&dev_11b8&subsys_15cd1028";"pci\ven_10de&dev_11b8&subsys_190a103c";"pci\ven_10de&dev_11b8&subsys_197a103c";"pci\ven_10de&dev_11b8&subsys_2255103c";"pci\ven_10de&dev_11b8&subsys_2256103c";"pci\ven_10de&dev_11b8&subsys_75001558";"pci\ven_10de&dev_11b8&subsys_77001558";"pci\ven_10de&dev_11ba";"pci\ven_10de&dev_11bc";"pci\ven_10de&dev_11bc&subsys_02701558";"pci\ven_10de&dev_11bc&subsys_03711558";"pci\ven_10de&dev_11bc&subsys_03761558";"pci\ven_10de&dev_11bc&subsys_053f1028";"pci\ven_10de&dev_11bc&subsys_153f1028";"pci\ven_10de&dev_11bc&subsys_176210cf";"pci\ven_10de&dev_11bc&subsys_176c103c";"pci\ven_10de&dev_11bd";"pci\ven_10de&dev_11bd&subsys_053f1028";"pci\ven_10de&dev_11bd&subsys_10db1462";"pci\ven_10de&dev_11bd&subsys_153f1028";"pci\ven_10de&dev_11bd&subsys_176110cf";"pci\ven_10de&dev_11bd&subsys_176c103c";"pci\ven_10de&dev_11be";"pci\ven_10de&dev_11be&subsys_053f1028";"pci\ven_10de&dev_11be&subsys_10db1462";"pci\ven_10de&dev_11be&subsys_10eb1462";"pci\ven_10de&dev_11be&subsys_153f1028";"pci\ven_10de&dev_11be&subsys_176010cf";"pci\ven_10de&dev_11be&subsys_176c103c";"pci\ven_10de&dev_11be&subsys_51051558";"pci\ven_10de&dev_11be&subsys_51061558";"pci\ven_10de&dev_11be&subsys_71021558";"pci\ven_10de&dev_11be&subsys_71041558";"pci\ven_10de&dev_11fa";"pci\ven_10de&dev_11fc";"pci\ven_10de&dev_11fc&subsys_00011179";"pci\ven_10de&dev_11fc&subsys_05cc1028";"pci\ven_10de&dev_11fc&subsys_10fb1462";"pci\ven_10de&dev_11fc&subsys_111d1462";"pci\ven_10de&dev_11fc&subsys_111e1462";"pci\ven_10de&dev_11fc&subsys_15cc1028";"pci\ven_10de&dev_11fc&subsys_1708172f";"pci\ven_10de&dev_11fc&subsys_17ef10cf";"pci\ven_10de&dev_11fc&subsys_1909103c";"pci\ven_10de&dev_11fc&subsys_197b103c";"pci\ven_10de&dev_11fc&subsys_221017aa";"pci\ven_10de&dev_11fc&subsys_221117aa";"pci\ven_10de&dev_11fc&subsys_221a17aa";"pci\ven_10de&dev_11fc&subsys_221e17aa";"pci\ven_10de&dev_11fc&subsys_2253103c";"pci\ven_10de&dev_11fc&subsys_2254103c";"pci\ven_10de&dev_12b9";"pci\ven_10de&dev_12b9&subsys_1909103c";"pci\ven_10de&dev_12b9&subsys_190a103c";"pci\ven_10de&dev_12b9&subsys_197a103c";"pci\ven_10de&dev_12b9&subsys_197b103c";"pci\ven_10de&dev_12b9&subsys_2253103c";"pci\ven_10de&dev_12b9&subsys_2254103c";"pci\ven_10de&dev_12ba&subsys_17ed10cf";"pci\ven_10de&dev_137a&subsys_222517aa";"pci\ven_10de&dev_137a&subsys_223217aa";"pci\ven_10de&dev_137a&subsys_505a17aa";"pci\ven_10de&dev_137b&subsys_224817aa";"pci\ven_10de&dev_13b0&subsys_06d91028";"pci\ven_10de&dev_13b0&subsys_116b1462";"pci\ven_10de&dev_13b0&subsys_116c1462";"pci\ven_10de&dev_13b0&subsys_11761462";"pci\ven_10de&dev_13b0&subsys_16d91028";"pci\ven_10de&dev_13b0&subsys_194b10cf";"pci\ven_10de&dev_13b0&subsys_194c10cf";"pci\ven_10de&dev_13b0&subsys_222e17aa";"pci\ven_10de&dev_13b0&subsys_223017aa";"pci\ven_10de&dev_13b0&subsys_80d5103c";"pci\ven_10de&dev_13b0&subsys_80d6103c";"pci\ven_10de&dev_13b0&subsys_8109103c";"pci\ven_10de&dev_13b0&subsys_810a103c";"pci\ven_10de&dev_13b1&subsys_01cf1b0a";"pci\ven_10de&dev_13b1&subsys_06d91028";"pci\ven_10de&dev_13b1&subsys_06e51028";"pci\ven_10de&dev_13b1&subsys_116b1462";"pci\ven_10de&dev_13b1&subsys_116c1462";"pci\ven_10de&dev_13b1&subsys_11771462";"pci\ven_10de&dev_13b1&subsys_16d91028";"pci\ven_10de&dev_13b1&subsys_194d10cf";"pci\ven_10de&dev_13b1&subsys_194e10cf";"pci\ven_10de&dev_13b1&subsys_222e17aa";"pci\ven_10de&dev_13b1&subsys_223017aa";"pci\ven_10de&dev_13b1&subsys_75001558";"pci\ven_10de&dev_13b1&subsys_75021558";"pci\ven_10de&dev_13b1&subsys_77001558";"pci\ven_10de&dev_13b1&subsys_77021558";"pci\ven_10de&dev_13b1&subsys_80d4103c";"pci\ven_10de&dev_13b1&subsys_80d5103c";"pci\ven_10de&dev_13b1&subsys_80d6103c";"pci\ven_10de&dev_13b1&subsys_8108103c";"pci\ven_10de&dev_13b1&subsys_8109103c";"pci\ven_10de&dev_13b1&subsys_810a103c";"pci\ven_10de&dev_13b2&subsys_01cf1b0a";"pci\ven_10de&dev_13b2&subsys_116b1462";"pci\ven_10de&dev_13b2&subsys_116c1462";"pci\ven_10de&dev_13b2&subsys_194f10cf";"pci\ven_10de&dev_13b2&subsys_195010cf";"pci\ven_10de&dev_13b2&subsys_222d17aa";"pci\ven_10de&dev_13b2&subsys_222f17aa";"pci\ven_10de&dev_13b2&subsys_80d5103c";"pci\ven_10de&dev_13b2&subsys_810a103c";"pci\ven_10de&dev_13b3&subsys_05cd1028";"pci\ven_10de&dev_13b3&subsys_11031462";"pci\ven_10de&dev_13b3&subsys_113e1462";"pci\ven_10de&dev_13b3&subsys_15cd1028";"pci\ven_10de&dev_13b3&subsys_2255103c";"pci\ven_10de&dev_13b3&subsys_2256103c";"pci\ven_10de&dev_13b4";"pci\ven_10de&dev_13b4&subsys_07a91028";"pci\ven_10de&dev_13b4&subsys_196610cf";"pci\ven_10de&dev_13b4&subsys_196910cf";"pci\ven_10de&dev_13b4&subsys_224c17aa";"pci\ven_10de&dev_13b4&subsys_225017aa";"pci\ven_10de&dev_13b4&subsys_824c103c";"pci\ven_10de&dev_13b4&subsys_824d103c";"pci\ven_10de&dev_13b4&subsys_8275103c";"pci\ven_10de&dev_13b4&subsys_8277103c";"pci\ven_10de&dev_13b6";"pci\ven_10de&dev_13b6&subsys_07b01028";"pci\ven_10de&dev_13b6&subsys_07b11028";"pci\ven_10de&dev_13b6&subsys_07bf1028";"pci\ven_10de&dev_13b6&subsys_17b01028";"pci\ven_10de&dev_13b6&subsys_17b11028";"pci\ven_10de&dev_13b6&subsys_196710cf";"pci\ven_10de&dev_13b6&subsys_196a10cf";"pci\ven_10de&dev_13b6&subsys_224d17aa";"pci\ven_10de&dev_13b6&subsys_225117aa";"pci\ven_10de&dev_13b6&subsys_826b103c";"pci\ven_10de&dev_13b6&subsys_826d103c";"pci\ven_10de&dev_13b6&subsys_8270103c";"pci\ven_10de&dev_13b6&subsys_8272103c";"pci\ven_10de&dev_13b6&subsys_8275103c";"pci\ven_10de&dev_13b6&subsys_8277103c";"pci\ven_10de&dev_13b9";"pci\ven_10de&dev_13ba";"pci\ven_10de&dev_13bb";"pci\ven_10de&dev_13bc";"pci\ven_10de&dev_13f0";"pci\ven_10de&dev_13f1";"pci\ven_10de&dev_13f2&subsys_113a10de";"pci\ven_10de&dev_13f2&subsys_115e10de";"pci\ven_10de&dev_13f2&subsys_115f10de";"pci\ven_10de&dev_13f3&subsys_114310de";"pci\ven_10de&dev_13f8&subsys_06da1028";"pci\ven_10de&dev_13f8&subsys_11791462";"pci\ven_10de&dev_13f8&subsys_11dd10de";"pci\ven_10de&dev_13f8&subsys_11f51462";"pci\ven_10de&dev_13f8&subsys_16da1028";"pci\ven_10de&dev_13f8&subsys_222d17aa";"pci\ven_10de&dev_13f8&subsys_222f17aa";"pci\ven_10de&dev_13f8&subsys_75001558";"pci\ven_10de&dev_13f8&subsys_75021558";"pci\ven_10de&dev_13f8&subsys_77001558";"pci\ven_10de&dev_13f8&subsys_77021558";"pci\ven_10de&dev_13f8&subsys_80d6103c";"pci\ven_10de&dev_13f8&subsys_8109103c";"pci\ven_10de&dev_13f9&subsys_06da1028";"pci\ven_10de&dev_13f9&subsys_11781462";"pci\ven_10de&dev_13f9&subsys_11961462";"pci\ven_10de&dev_13f9&subsys_16da1028";"pci\ven_10de&dev_13f9&subsys_222d17aa";"pci\ven_10de&dev_13f9&subsys_222f17aa";"pci\ven_10de&dev_13f9&subsys_80d6103c";"pci\ven_10de&dev_13f9&subsys_8109103c";"pci\ven_10de&dev_13fa&subsys_06da1028";"pci\ven_10de&dev_13fa&subsys_11751462";"pci\ven_10de&dev_13fa&subsys_11951462";"pci\ven_10de&dev_13fa&subsys_11c910de";"pci\ven_10de&dev_13fa&subsys_16da1028";"pci\ven_10de&dev_13fa&subsys_222d17aa";"pci\ven_10de&dev_13fa&subsys_222f17aa";"pci\ven_10de&dev_13fa&subsys_75001558";"pci\ven_10de&dev_13fa&subsys_75021558";"pci\ven_10de&dev_13fa&subsys_77001558";"pci\ven_10de&dev_13fa&subsys_77021558";"pci\ven_10de&dev_13fa&subsys_80d6103c";"pci\ven_10de&dev_13fa&subsys_8109103c";"pci\ven_10de&dev_13fb&subsys_11b01462";"pci\ven_10de&dev_1430";"pci\ven_10de&dev_1431&subsys_119310de";"pci\ven_10de&dev_1436";"pci\ven_10de&dev_1436&subsys_07b01028";"pci\ven_10de&dev_1436&subsys_115a1462";"pci\ven_10de&dev_1436&subsys_115b1462";"pci\ven_10de&dev_1436&subsys_116b1462";"pci\ven_10de&dev_1436&subsys_17b01028";"pci\ven_10de&dev_1436&subsys_196810cf";"pci\ven_10de&dev_1436&subsys_196b10cf";"pci\ven_10de&dev_1436&subsys_224d17aa";"pci\ven_10de&dev_1436&subsys_225117aa";"pci\ven_10de&dev_1436&subsys_8270103c";"pci\ven_10de&dev_1436&subsys_8272103c";"pci\ven_10de&dev_1436&subsys_8275103c";"pci\ven_10de&dev_1436&subsys_8277103c";"pci\ven_10de&dev_15f0";"pci\ven_10de&dev_15f7&subsys_11da10de";"pci\ven_10de&dev_15f8&subsys_118f10de";"pci\ven_10de&dev_15f9&subsys_116b10de";"pci\ven_10de&dev_17f0";"pci\ven_10de&dev_17f1";"pci\ven_10de&dev_17fd&subsys_117110de";"pci\ven_10de&dev_17fd&subsys_117310de";"pci\ven_10de&dev_1b30";"pci\ven_10de&dev_1b38&subsys_11d910de";"pci\ven_10de&dev_1bb0";"pci\ven_10de&dev_1bb1";"pci\ven_10de&dev_1bb3&subsys_11d810de";"pci\ven_10de&dev_1bb3&subsys_11e010de";"pci\ven_10de&dev_1bb4&subsys_11c610de";"pci\ven_10de&dev_1bb6&subsys_07b11028";"pci\ven_10de&dev_1bb6&subsys_11b410de";"pci\ven_10de&dev_1bb6&subsys_11f11462";"pci\ven_10de&dev_1bb6&subsys_17b11028";"pci\ven_10de&dev_1bb6&subsys_197010cf";"pci\ven_10de&dev_1bb6&subsys_197310cf";"pci\ven_10de&dev_1bb6&subsys_224c17aa";"pci\ven_10de&dev_1bb6&subsys_225017aa";"pci\ven_10de&dev_1bb6&subsys_8270103c";"pci\ven_10de&dev_1bb6&subsys_8272103c";"pci\ven_10de&dev_1bb7&subsys_07b11028";"pci\ven_10de&dev_1bb7&subsys_11e91462";"pci\ven_10de&dev_1bb7&subsys_17b11028";"pci\ven_10de&dev_1bb7&subsys_197110cf";"pci\ven_10de&dev_1bb7&subsys_197410cf";"pci\ven_10de&dev_1bb7&subsys_224c17aa";"pci\ven_10de&dev_1bb7&subsys_225017aa";"pci\ven_10de&dev_1bb7&subsys_8270103c";"pci\ven_10de&dev_1bb7&subsys_8272103c";"pci\ven_10de&dev_1bb7&subsys_95011558";"pci\ven_10de&dev_1bb8&subsys_07b11028";"pci\ven_10de&dev_1bb8&subsys_11ad1462";"pci\ven_10de&dev_1bb8&subsys_11b410de";"pci\ven_10de&dev_1bb8&subsys_17b11028";"pci\ven_10de&dev_1bb8&subsys_197210cf";"pci\ven_10de&dev_1bb8&subsys_197510cf";"pci\ven_10de&dev_1bb8&subsys_224c17aa";"pci\ven_10de&dev_1bb8&subsys_225017aa";"pci\ven_10de&dev_1bb8&subsys_8270103c";"pci\ven_10de&dev_1bb8&subsys_8272103c";"pci\ven_10de&dev_1bb8&subsys_95011558";"pci\ven_10de&dev_1c30";"pci\ven_10de&dev_1cb1";"pci\ven_10de&dev_1cb2";"pci\ven_10de&dev_1cb3"))) )

As ugly as it looks, it still evaluates quickly enough

A: False
T: 13.022 ms
I: singular boolean

edit I was about to warn that WMI calls are expensive, and then I saw you posted your evaluation time

A: False
T: 3215.827 ms

3215.827 ms in the Fixlet Debugger is going to take a lot longer in the real client with CPU throttling enabled, so watch out for performance impacts before you use this in a lot of Fixlet relevance. The WMI queries are better suited to Analysis properties where you can change the ‘evaluate every X minutes’ value so you’re not constantly hitting WMI.

2 Likes

@JasonWalker - thanks so much for this, Jason. Drivers are no something I deal with on a day-to-day basis, so some of this is a little over my head and I have some follow-up questions…

  1. The type of update I am trying to deploy is ones like this:

https://www.dell.com/support/home/us/en/4/drivers/driversdetails?driverId=C2N7T

Does this fit into the logic you provided above?

  1. Looking at your code to detect the PnP IDs, I see you are looking in “C:\Temp\Display.Driver”… I presume this would need to be modified per environment? What is the standard path for these?

FYI, I was able to modify @trn’s relevance above to do what we need, i.e.:

exists (unique values of (string values of property "DriverVersion" of it) of (select objects "DriverVersion, DeviceClass, Description from Win32_PnPSignedDriver where DeviceClass = 'DISPLAY' AND Description like 'Intel%25' AND not (DriverVersion >= '10.18.14.4280')" of wmi))

That way, we’re excluding higher driver versions (if they exist) and locking it down to Intel-only. WMI is always slow, but it’s a start.

Thanks.

1 Like

Yes,the format I used should work with any Plug-n-Play driver.

The referenced to the .inf file in the relevance, is based on extracting the download package to determine which device IDs are supported by the driver. I only use that particular relevance in the debugger; its output is the list of devices that I copy/paste into the last relevance statement.

Do you have a final version as an example?

I do have a few examples of fixlets that install drivers, but I’m checking the installed file location rather than WMI:

These examples are old, so I’d probably write the relevance differently today, but they are not a bad place to start, but generally driver info can be found through the files, the registry, or WMI. Generally the Registry is going to be the fastest if you can find a good way to read it there.