Sensing Log-on computername programmatically

J

John Goins

Is there a way to read the computer name that a user uses to log onto
Win2003 Terminal Server? I would like to give different rights based on the
computer name. Is this possible?

Thanks,

Jay Goins
 
V

Vera Noest [MVP]

From http://ts.veranoest.net/ts_faq.htm

Q. How can I retrieve the client IP number?

A. You can retrieve the client IPnumber and computername with the
WTSQuerySessionInformation function, or the client computername with
the environment variable %CLIENTNAME%.

Recommended reading:

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/termserv/termserv/wtsquerysessioninformation.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/termserv/termserv/terminal_services_programming_guidelines.asp
_________________________________________________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
TS troubleshooting: http://ts.veranoest.net
SQL troubleshooting: http://sql.veranoest.net
*----------- Please reply in newsgroup -------------*
 
J

John Goins

Thank you, Vera!

Jay Goins

Vera Noest said:
From http://ts.veranoest.net/ts_faq.htm

Q. How can I retrieve the client IP number?

A. You can retrieve the client IPnumber and computername with the
WTSQuerySessionInformation function, or the client computername with
the environment variable %CLIENTNAME%.

Recommended reading:

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/termserv/termserv/wtsquerysessioninformation.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/termserv/termserv/terminal_services_programming_guidelines.asp
_________________________________________________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
TS troubleshooting: http://ts.veranoest.net
SQL troubleshooting: http://sql.veranoest.net
*----------- Please reply in newsgroup -------------*
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top