Rx_
Nothing In Moderation
- Local time
- Today, 13:12
- Joined
- Oct 22, 2009
- Messages
- 2,803
Was trying to solve another problem, came across this. Thought it might come in handy for Terminal Services or Citrix.
Has anyone tried this? Please indicate OS for both client and server.
Using Environ to get the Terminal Services ClientName
Returns value of ComputerName environment variable of a remote host. The ClientName environment variable is Terminal Services specific, and only appears in a user's environment when they are logged on to a Terminal server, in Remote Administration or Application Server mode.
Environ("ClientName")
example result:MyServerUsing Environ to get Terminal Services SessionName
The SessionName variable is only defined if the Terminal Services system component is installed to the Windows XP clients or newer. [1] When a client connects via a terminal server session, SessionName environment variable is a combination of the connection name, followed by a pound symbol {#} and then the session number.
Environ("SESSIONNAME")
example result: Console
Has anyone tried this? Please indicate OS for both client and server.
Using Environ to get the Terminal Services ClientName
Returns value of ComputerName environment variable of a remote host. The ClientName environment variable is Terminal Services specific, and only appears in a user's environment when they are logged on to a Terminal server, in Remote Administration or Application Server mode.
Environ("ClientName")
example result:MyServerUsing Environ to get Terminal Services SessionName
The SessionName variable is only defined if the Terminal Services system component is installed to the Windows XP clients or newer. [1] When a client connects via a terminal server session, SessionName environment variable is a combination of the connection name, followed by a pound symbol {#} and then the session number.
Environ("SESSIONNAME")
example result: Console