How do I know if a user is logged in (Windows 2000 and newer)?
It is necessary to find out in the Win-service that the user has logged in interactively. Get some notice or something else. What are some ways to find out?
Variants.
Another API for the remote desktop contains the WM_WTSSESSION_CHANGE
notification. And it is possible that the WMI class Win32_LogonSession may contain the necessary events.
There are scripts that are executed when you log on to the system - look in the local security policy.
Source: https://ru.stackoverflow.com/questions/13459/
All Articles