Retrieving local computer name from within Terminal Services session

Brook75

New member
Local time
Today, 00:50
Joined
Jan 22, 2007
Messages
6
Hi,
We are using an Access database stored on a shared drive, which the users access via a Terminal Services session.
What I need to do is get the computer name from the local PC from within the terminal services session. Is this possible? I have been able to get the username for a computer when using that computer, but not through Terminal Services.
Any help is gratefully received!
:confused:
 
Manually you could use the netstat command to show all active TCP connections then look for the PC's that are connected to the terminal server port (usually 3389).

I suppose you could dump that information into a text file then parse that up to get what you need, not very elegant but it should work.

The only other way I know of would be to use sockets to monitor the specific ports then try to lookup the pc information, this is doable but from access it is not easy.
 
not quite the same, but if each user has an individual TS login (or maybe each PC ditto), then perhaps you dont need to know the actual PC idenitity
 
Thanks for your replies.
The users do have individual log ins to the TS but I am looking to create a file on the PC (which is auto logged in) which would then be picked up by a scheduled task running on the PC.
I'll have a look into the netstat option to see if I can use that.
 
we just use a common folder on a main server, rather than on individual pc's
 

Users who are viewing this thread

Back
Top Bottom