Sensing Log-on computername programmatically

  • Thread starter Thread starter John Goins
  • Start date Start date
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
 
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 -------------*
 
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 -------------*
 
Back
Top