Relevance based on custom property

(imported topic written by Ryan_PD)

Apologies for the newb question;

I would like to ensure an auto-deployed script is only executed when the current logged on user property equals the primary user property. Eg: if “tmcgroga” is the primary user on the machine then the script will only execute if “tmcgroga” is the current user.

I can’t figure out how to use my custom primary user property in the relevance?! Seems very simple, but i’m stuck. Any help is greatly appreciated!

Thanks guys/gals,

R

(imported comment written by SystemAdmin)

Depends what you mean by “primary user”

current user returns the user that is on the console of the machine

logged on user returns people logged on by other means as well

If you are meaning you are trying to detect the “owner” of the machine, that is something that would be hard to determine without extra information.

(imported comment written by SystemAdmin)

if you specifically want it to run when “tmcgroga” is the user then

name of current user = "tmcgroga"

should work if you want that user logged into the console, or

exists logged on user whose (name of it = "tmcgroga")

to find that user logged on in any way.

(imported comment written by SystemAdmin)

It sounds to me like you are trying to run a Fixlet or Task and use something like the following in your relevance:

(results of property “primary user” = current user)

This is not possible but we can take a different approach. It is important to understand you cannot refer to existing properties in your relevance of a Fixlet.

A little more info. As you probablyknow:

  1. A “property” uses relevance to retrieve information from an endpoint.

  2. A Fixlet/Task uses relevance to determine if it is applicable and can execute on an endpoint.

  3. Relevance is EXTREMELY fast in most cases so instead of allowing you to query a property you will simply copy the relevance and reuse it in your Fixlet.

For example:

To compare, custom property: “primary user” to “logged on user” you would simply copy and paste that relevance into your Fixlet such as:

(relevance_for_primary_user) = (relevance_for_logged_in_user)

This will cause the Fixlet to only be true when the logged on user is equal to your primary user.

You can find the relevance to copy under “Tools | Manage Properties” in the console.

(imported comment written by Ryan_PD)

Thanks Jimmie Jones,

That cleared up the mystery for me

Thanks again,