We have a shared machine running windows xp professional, and people log in to that machine using remote desktop with a single username and password. Problem with Windows remote desktop is that when a another user logs in, the current user gets kicked out of his/her session. I have gotten pretty tired of this and would like to find out a way to see who is logged in to that machine so that everyone can give one another a head-up.
After some search I found a solution on StackOverflow using C#
user-logged-into-remote-machine
However, since we use the same username and password to log in to the shared machine, this method will only tell us that someone (the shared username) is logged into the remote computer, but not who. Is it possible to find out the name of the computer that is connected to the shared machine? Thank you very much.
You can fetch this information using the native Win32 API (see WTSQuerySessionInformation). If you are using a .NET language, you can use the Cassia library, which wraps the native API and makes it a bit easier to use.
Using Cassia, you could write something like this:
Note that if you are trying to access a Windows XP machine remotely with this API, you will need to set the AllowRemoteRPC registry key and reboot before you can do so.