Relevance to check existence of an empty value in a registry key

(imported topic written by AndreiShoro)

hello,

I have to use runascurrentuser.exe in order to deploy a task which can be installed only as a local user on Win7 x64.

I have managed to do this but now I need a relevance to check if there is an user logged in on the image.

In both cases: “logged in user” and “logged off user” the task is successfully deployed but the package is really deployed only for PC who has a logged in user.

So I have to put e relevance to check if there is a logged in user for the task to be deployed.

My idea is to check if “USERNAME” value from “Volatile Environment” registry key of HKEY_USERS is empty…

I tried to find and adapt some relevances to fit mine but no success.

Any help?

Thank you in advance!

(imported comment written by MattPeterson)

I would suggest to use an action constrant when taking action. In the Users tab select “Run only when at least one of the selected users is logged on” option, then choose “All users”.

(imported comment written by AndreiShoro)

I put
exists (logged on users)
as relevance and It worked.

I will try also your example. thank you!

(imported comment written by MBARTOSH)

Can you put this statement in the relevance of your task, “exists logged on user”.

(imported comment written by AndreiShoro)

I have already put this.I just mentioned above.

In conclusion we can use either
exists (logged on user)
as a relevance or MattPeterson

s idea: In the Users tab select “
Run only when at least one of the selected users is logged on
” option, then choose “
All users

Using
exists (logged on user)
relevance we will not be able to see computers with User Name in the Target of a Take Action

Using “
Run only when at least one of the selected users is logged on
” we will be able to choose all computers from the Target of Take Action but the Task will evalute each Computer target and will execute the task only when an user will be logged on.