Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the client name
Message
De
19/04/2015 04:56:08
 
 
À
19/04/2015 04:37:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01618480
Message ID:
01618690
Vues:
27
>>>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform