Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MS login name in vfp?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00173535
Message ID:
00173663
Vues:
24
>>Hi Abbie,
>>
>>>Is there a quick/easy :) way to get the login name of someone logged into a computer on a network. I know sys(0) will give me the machine name, but I'd like the actually user, not the machine.
>>
>>SYS(0) should give you both separated by "#".
>>
>>Christof
>
>That depends on what version of FP/VFP you're using and what network you're on.
>
>There are a couple good third party libraries to check out, GPLib and NetLib, for functions to get network connection information. Also of course there are Win API functions you can call, but I don't know what they are without looking them up.
>
>I've always either used GPLib, or relied on environment variables set by login scripts (which I knew in advance for a particular network's login scripts.)
>
>Rich

Hi

I read registry to get user's name.
In Windows NT I read HKEY_CURRENT_USER\Volatile Environment value LOGNAME.
In Windows 95 I read HKEY_LOCAL_MACHINE\System\CurrentControlSet\control value Current User.

It works fine for both Windows 95 and NT.
Igor Gelin
Database Developer
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform