6
2
I'd like to determine if the currently logged in user is logged in by physically being at the computer of if they logged in via remote desktop.
I'm fine with limiting this to windows 7 if that helps.
I'm also fine with answers that determine this programatically or manually, though I would ultimatly prefer a programmatic answer.
2"I would ultimatly prefer a programmatic answer" - Then you're in the wrong place and StackOverflow would be better suited to requests for code. – Karan – 2013-01-06T01:50:03.767
1@Karan I originally thought so too, but I think this could be of use to any windows power user. – chollida – 2013-01-06T02:40:47.920
One you have this information what are you doing with it, it affects what you can do as a solution (if the question is *"I want to know if the computer I just walked up to is in a terminal session"* the answer could be as simple as *"Move your mouse to the top middle of the screen and a bar to close the remote desktop session shows up"*) – Scott Chamberlain – 2013-01-06T03:06:21.193
Also as is your question would be closed on SO for being overly broad and vauge. Are you wanting to check your user? Are you wanting to see if users on a server are connected via the console or via RDP? Is the app being run on a computer with
Wtsapi32.dll
(only server editions have it) – Scott Chamberlain – 2013-01-06T03:10:52.027