Is there a way to programmatically detect if there is a LogMeIn session on the current Windows PC / user?
I have tried it in several ways (in C#, but the language is irrelevant):
- Using a CPU performance counter, assuming that LogMeInRC.exe's CPU usage was substantially higher while in session. This approach is able to detect some sessions, but the error rate is way too high.
- By monitoring the Performance Counters
IO Write Bytes/s
orIO Data Bytes/s
of LogMeIn. This works only initially. If the session is older than a minute, these Performance Counters don't record any activity, even though LogMeIn still has network traffic.
Any hints?
Solved it by intercepting ETW traces:
This way I get the number of UDP Sends by the LogMeIn process, which is perfect for detecting LogMeIn sessions.