How to handle: The operator "storage folder" is not defined

(imported topic written by tymek.gedliczka)

Hi,

in my analysis I’m trying to use:

storage folder of client

It works fine on most clients and returns path to BESClient directory, but for some clients I get and the following error:

The operator “storage folder” is not defined.

First question: What could be the reason for this error? Why on some clients it works while on others it doesn’t ?

Another question: How to avoid undefined operator error in the analysis ? I was trying to use the bar operator to fallback to some default, for example:

storage folder of client as string | “N/A”

That didn’t work. On computers where the problem occurred there is still the same error.

Thanks in advance for any hints!

(imported comment written by jgstew)

This is happening most likely because the clients have different versions of the client installed or different OSes installed. Not all operators are supported by all versions of the client in all OSes.

“Storage Folder of client” is a shortcut. There should be an equivalent relevance statement that would have wider compatibility, but more complicated.

(imported comment written by tymek.gedliczka)

Hi James, thank you for the reply.

How can I find a definition of such a shortcut?

Please also explain how errors of type “The operator foo is not defined” could be handled with a fallback value. Why the bar operator doesn’t work in such cases ?

(imported comment written by jgstew)

It seems that “storage folder of client” is only available on 9.x clients.

if (exists properties whose(it as string as lowercase starts with “storage folder of”)) then (storage folder of client as string) else ERROR “IncompatibleClient”

To find away around using “storage folder of client” on older clients you need to figure out what it should return and then write relevance to return that.

(imported comment written by tymek.gedliczka)

Thank you!

(imported comment written by Tim.Rice)


data folder of client
” doesn’t seem to work with pre-9.0 clients either.


parent folder of client
” seems to be a good starting point. It seems to consistently return the path the BES Client folder across all the versions that I have running (8.2 thru 9.1).

  • For Windows it tends to be “C:\Program Files\BigFix Enterprise\BES Client”
  • For *NIX clients it returns “/opt/BESClient/bin”
  • Mac’s seem to return /Library/BESAgent"

Not sure if this helps you, but from these paths you should be able to append the remaining path to “__BESData”

(imported comment written by jgstew)

I believe on the Mac, the data folder of client is not a subfolder of the parent folder of client.