Client Relevance - BES Property Value exists within text file

Looking to develop a relevance for a BES Action or Site to determine if endpoints should be subscribed.Just need some assistance in getting pointed in the right direction.

Have a text file such as this that has values line by line:

66158
66459
66462
65747
66232

I’d like to compare these values against an existing BES Property and if they match then the client would be relevant, So far, I have the following that does not work, but feel as if it’s semi the right direction?

(exists (line of it) whose (it it equals (result of BES properties “Unique ID” of client))) of file “C:\Test.txt”

I got a little further with this. the values of the BES Properties are stored in the registry on the end windows devices so I adjusted from attempting from reading from the bes properties value to the registry like so:

(exists (line of it) whose (it equals (value "Unique ID" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Device" of native registry as string))) of file “C:\Test.txt”

The above works, but only if the text file exists on the endpoint. I’d honestly like to avoid having to deploy the text file down to all the endpoints. Is there a method where I can keep the file on the Bigfix Server and have it determine relevance against either the property value or registry value?

@Austin4778, the following relevance works in my BES lab environment.

if (exists setting “_Test35219UniqueID” of client) then ((exists (line of it) whose (it equals (value of setting “_Test35219UniqueID” of client))) of file “C:\Shared\35219.txt”) else (False)

First checking for the setting to exist and then checking its value against the values in the data file. I duplicated the list you provided in your original example to ensure that only unique values to avoid multiplicity.

PS - 35219 is simply the ID of your post.

Thanks for the reply! I see you have the text file potentially setup in a share? The only problem I can see is that not all endpoints will have network ACLs in-place to obtain the text file. Is there an approach where I can leverage existing properties and determine relevance from those property values compared to the text file if the text file resides on the Bigfix server?

@Austin4778, the text file is in a folder named “Shared”, but it’s local to the endpoint that the relevance was tested on.

If you need BigFix to deliver the file, you can use (a) the site files option under the appropriate custom site or (b) the prefetch command in custom content.

1 Like

I was going down the site files path. Looks to be working well so far. Thanks for the feedback and assistance!

1 Like