Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the client name
Message
From
19/04/2015 04:56:08
 
 
To
19/04/2015 04:37:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01618480
Message ID:
01618690
Views:
28
>>>Just as an FYI for anyone interested The solution is incredibly simply and does not require accessing any API. You can retrieve the users computer name under a terminal services session simply using Windows Scripting Host in 2 lines ("doh!"):
>>>
>>>
>>>objShell = CreateObject("WScript.Shell")
>>>strClient = objShell.ExpandEnvironmentStrings("%clientname%")
>>>? strClient
>>>
>>>
....
>OK, thanks. We are using this on our own terminal services servers
>
>.
We also run TS sessions, often under an account name used by a small group. Identyfying the machine at the other end of TS is a step nearer to fix some issues brought on by not setting up group policies ;-)
Have you found an easy way to get the loginname of the person manning the machine running the TS session?

tia

thomas
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform