We have a (very) fragile software suite running on a server in our datacenter that requires a user to be logged in, but freaks out and crashes if the user logs in twice (resource contentions, all sorts of issues)
Due to its fragile nature, certain processes break all the time, requiring our support guys to connect to the machine via RDP and restart stuff. They connect via the generic account that is running in the open session, and disconnect instead of logging off.
Problem is, sometimes they don't end up connecting to the disconnected session, but instead spawn a new session, and the server subsequently fails.
I am looking for a way to detect, upon connecting/ logging in, if there is another RDP session on the machine and warn the user so disaster can be averted.
I would dearly love to chuck this machine out of a high window, but replacing the software is not an option at this point.
In the end, I implemented both solutions. This works swimmingly.