PDA

View Full Version : How to detect if application was executed through RDP / RDC?



HappyCoder
13th July 2016, 15:37
Hi,
is it possible to detect if my application was started through a Remote Desktop Session?
E.g. if a software was installed on a server. I want to know if my application was
started directly on the server or if it was started from a workstation that has an active
RDP session to the server.
Thx

Lesiok
13th July 2016, 15:58
We are testing system variable CLIENTNAME. If it is empty or equal CONSOLE application is working localy.
Otherwise, it is RDP session and CLIENTNAME is equal name of local computer.