At 02:28 PM 15/01/03 +1200, you wrote:
I need a reliable way of recognising the session, the user name and
pc name on a mixed setup ie Terminal Server and normal lan logins.

session - process_id if other two can be unique

username - windows network and TS both allow more than one
login with the same user name.

pcname - ditto, on a TS it is the same PC - even if you map some
hardware through (such as serial/audio ports)

Any ideas anyone ?
We do similar by interrogating environment variables, for WIN NT/2000/XP we use COMPUTERNAME
which is set to the same as the PC share name.

On TS we use an environment variable called CLIENTNAME. I think this is set from the login process. We have assumed it is unique, and it could create problems if it isn't. Maybe you better just require all login names and/or PC names are different as all other sorts of network browsing & trouble-shooting etc gets confusing if they are not unique.



John Bird
Beyond Data Systems
[EMAIL PROTECTED]
Ph 64-3-3654656 or 027 436-7702
Fax 03-3793340

---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to