Suppose there are multiples users currently logged on on Windows. Say, user1 logs on, then switch user and user2 logs on, (without making user1 log off). I want to create a script that runs in the background all the time that does a full restart right after the fifth user did a 'switch user'.
Which language should I use, and how would I even start doing that?