Q
Problem solve Get help with specific problems with your technologies, process and projects.

How can I make my code retrieve the name of a thin client machine in a terminal server environment?

How can I retrieve the name of a thin client machine in a terminal server environment? I know you can get the name by typing %clientname% at the command prompt. Is there a way I can work this into my code? Can I pass it as a parameter when I launch my application? Or is there an easier way to do it within the application? I have tried machineName and computerName and both return the name of the terminal server.
The magic is in the WTSQuerySessionInformation API.

Dig Deeper on Win Development Resources

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

Close