Kaseya Community

How to detect whether a user is logged in and active, logged in and idle, or no user logged in?

This question is not answered

Hello,

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 6.2.0.0 - 1.2.0.22. I have tested on about 10 agents, of different versions of Windows (XP, 7, 2008).

Kind regards,
Ole Andreas Ringdal



[edited by: Ole Andreas Ringdal at 6:42 AM (GMT -7) on 3-23-2012] Trying yet again...
All Replies
  • Please submit a support ticket for the IF check issue.