Question: [This question](https://stackoverflow.com/questions/159910/determine-if-a-program-is-running-on-a-remote-desktop) tells me how to detect a remote desktop session.

Do anybody know if it's possible to find out from where the remote connection was initialized?

Answer: 
For me, this worked, it gets the name of the machine connected.

```
Environment.GetEnvironmentVariable("CLIENTNAME")

```
try running [qwinsta](http://technet.microsoft.com/en-us/library/cc731503%28WS.10%29.aspx)