What's the simplest way of programatically checking whether or not a particular Windows machine is currently being used by a human being?
I'm thinking about writing a "politeness monitor" for our rather limited Internet connection - basically a way to see who is currently actively using the Internet at any one time, so when someone needs to download a large file, they can minimise the annoyance to others (and keep those statistics historically, so one can predict when the uplink isn't going to be too laggy). I'm trying to gather multiple sources of evidence which one could then use to infer activity.
For Windows users, it would be quite useful to be able to see whether or not they are typing or moving the mouse around, or some other equivalent measure of activity. I've already considered using the System.Diagnostics.Process class to see if certain processes are running (online games and other bandwidth heavy apps) and when they were launched. I figure if any of a bunch of common userland processes (firefox, iTunes etc.) were launched in the last half-hour, it's a reasonable bet that there's a meatbag sitting in the chair doing something. Once I've detected activity, I send a tiny HTTP POST request (saying "Hey, I'm alive and doing something!") to the server and a webapp running on my Linux box gets updated to show that the user is active.
I've considered using IM status, but different IM clients seem to have different levels of OS integration - and people don't seem to update those as much as would be nice. Like all good Web 2.0 citizens, I am using Twitter, of course. ;)
Disclaimer: I'm a UNIX and Mac guy who avoids Windows. I've fiddled around with .NET in Mono but have never touched Win32 APIs before. Be gentle.