Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to capture the username
Message
De
27/06/2000 18:52:58
 
 
À
27/06/2000 18:45:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00385462
Message ID:
00385466
Vues:
19
>How do I capture the logged in (current) username say from NT from within a VFP applicatiion?
>

You can extract it from SYS(0) - everything to the left of the "#" is the NetBIOS machine name, and everything to the right is the Windows user name. There are also several API calls you can use that are discussed in the FAQ here on UT (advisable if you need the username relative to the login used to access a shared resource rather than the Windows user name) and the Wscript.Network has a UserName property as well.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform