Relevance Statement Clarification

I am having some trouble understanding the vertical bar. Can someone explain this statement with the use of the vertical bar?

value “DisplayVersion” of key whose (value “DisplayName” of it as string contains “Microsoft Office 365 ProPlus - en-us”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry as string as version | “0.0.0.0” as version < “17.0.0.0” as version

Hello!

The vertical bar is used for error handling. In this case it means that if the relevance:

value "DisplayVersion" of key whose (value "DisplayName" of it as string contains "Microsoft Office 365 ProPlus - en-us") of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" of native registry as string as version

Returns an error, then instead of proceeding with the error, whatever is on the other side of the vertical bar is used instead! In this case “0.0.0.0” as version!

As a note: both the part on the left and the part on the right of the vertical bar MUST be of the same time (in this case version).

Are there any issue with using the pipe in this way?

Not if it works!

It simplifies the relevance a ton. Without it you’d want to check if the registry key exists, then if the value exists before you could do the comparison.

You also lose support for some older versions of the bigfix client

MUCH older versions… its been around a long time now

1 Like