Under normal circumstances, a VB.NET application of mine can check the ClientName environmental variable to get the name of the workstation the user is connecting from.
So when WorkstationX RDPs into ServerA:
- ComputerName=ServerA
- ClientName=WorkstationX
That works fine.
If I right-click on the application and choose Run As Administrator, the ClientName variable is not set.
Does anyone know of a way of easily getting the workstation name of the client connected to the terminal server, even when the application is launched via "Run As Administrator"?