Registry Keys for Lasso

(imported topic written by rquinn91)

Hi,

This is my first post to this forum so please excuse any displays of ineptitude.

I am trying to write a piece of relevance code to determine a Registry key value that would exist Either under One registry setting or the other.

The Key is called “DisplayVersion” and it would exist under either here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D12BCC89-FDBB-45D3-8C66-FF9945DE0041}

Or under here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{A2E5EAAC-703A-4056-8191-7D067D177293}

Here’s the code I tried with the Relevance Debugger and the results:

q: values “DisplayVersion” of keys (“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D12BCC89-FDBB-45D3-8C66-FF9945DE0041}”) OR “DisplayVersion” of keys (“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{A2E5EAAC-703A-4056-8191-7D067D177293}”) of native registry

E: The operator “keys” is not defined.

Any ideas?

Thanks,

(imported comment written by jeremylam)

The first registry key object needs to be “of native registry” just like the second one. Also, if you are using the “OR” operator, the two expressions should return booleans instead of registry key values, as yours currently do.

Here’s what I came up with, assuming you just want to know if the values exist:

(exists values “DisplayVersion” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{D12BCC89-FDBB-45D3-8C66-FF9945DE0041}” of native registry)
OR
(exists values “DisplayVersion” of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{A2E5EAAC-703A-4056-8191-7D067D177293}” of native registry)

The single-clause mode of Relevance Debugger / Fixlet Debugger provides better error messages - it’s better when you’re starting out.