dflynn21
asked on
Return Clients Hostname on a Terminal Server Using Visual Basic 2005
We are designing an application that requires us to return the hostname of the Client computer that is connecting to our Terminal Server. Using Visual Basic 2005, what is the best approach for returning this information.
ClientA ------------------à TSServerB
We are trying to return ClientA using a function that is running on a TSSERVERB Session.
ClientA ------------------à TSServerB
We are trying to return ClientA using a function that is running on a TSSERVERB Session.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
To verify open a command window (RUN cmd) and type SET.
Not sure what tool you are using but most have a way to get to the environment variables. If you version doesn't provide access the Windows Scripting Host can be referencee and the WSHShell.ExpandEnvironment
Dim wsh As New WshShell
Debug.Print wsh.ExpandEnvironmentStrin
replace %TEMP% with variable you need.