I am writing a C # program that is used on a desktop or server OS. And I need to know that the current user is working through RDP. How can I get this information?
The system variable% sessionname% will return the Console if it is local or RDP * if it is remote.
isRDP = [System.Environment] .GetEnvironmentVariable("SESSIONNAME").StartsWith("RDP-")