I'm trying to find a reliable way to detect if a PC has an active user, an idle user, or no user logged in. I have tried several options as detailed below, with no success:
The IF-command "User Activity Check" apparently detects this, as evident in the agent procedure log where it correctly logs either "User is logged in and active", "User is logged in and idle", or "User is not logged in". However, when using the IF-command in the following way:
IF User Activity check - User is idle or not logged in THEN Write "User is idle or not logged in" into the procedure log
...then ALL clients get "User is idle or not logged in" written into their procedure logs, regardless of whether they have an active user, an idle user, or no user logged in. Similarly, if I reverse the IF condition in the following way:
IF User Activity check - User is active THEN Write "User is active" into the procedure log
...then nothing is written into the procedure log on ANY of the clients -- the THEN never happens, even if is there is an active user logged in.
You can apparently also test this using the value of the #vAgentLabel.online# variable, where 0 means offline (no user logged in), 1 means online (active user), and 2 means idle. This does not work either. Both an idle (2) user and an active (1) user are correctly detected, but a PC with no user logged in (0) is incorrectly reported as a value of 1 (which should denote an active user). In other words, using #vAgentLabel.online# is also useless.
I really need to find a reliable way to detect this since the user's status (if any is logged in) determines whether to proceed with application installs, maintenance tasks, and so on.
We're on saas1, and all agents are on version 18.104.22.168 - 22.214.171.124. I have tested on about 10 agents, of different versions of Windows (XP, 7, 2008).
Kind regards,Ole Andreas Ringdal
Please submit a support ticket for the IF check issue.