Relevance for Audio Driver

I am trying to write relevance for the audio driver for a particular HP computer model.

This is what I have but it doesn’t work because the left side of the equation is a plural. The error is "the left operand of ‘!=’ must be singular. I know it has something to do with the ‘unique values’ clause which I have tried in several places but not the correct one.

(values "ProviderName" of it as string, values "DriverVersion" of it as string as 
version) of keys whose (exists key "Settings" of it) of key 
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ 
{4d36e96c- 
e325-11ce-bfc1-08002be10318}" of native registry != "Synaptics,            
8.65.321.20"

If I’m reading your relevance correctly, you want to detect when the Synaptics driver version 8.65.321.20 is not present on a machine.

See if this works for you:

Q: concatenation of ((values "ProviderName" of it as string; values "DriverVersion" of it as string) of keys whose (exists key "Settings" of it) of key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4d36e96c-e325-11ce-bfc1-08002be10318}" of native registry) does not contain "Synaptics8.65.321.20"
A: False

Note: the comma in your original relevance created a tuple. I’ve replaced that with a semicolon which results in a list. I’ve also removed the as version cast so that everything comes back as a string, which can then be concatenated into a single string for a not contains comparison.

1 Like

Thank you for the explanation. I wouldn’t have gotten that.

I ended up just using the version number, but using the provider name with the version might be better.

unique value of ((values "DriverVersion" of it as string as version) of keys whose 
 (exists key "Settings" of it) of key 
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\ 
{4d36e96c-e325-11ce-bfc1-08002be10318}" of native registry) < "8.65.321.20"