Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retriving computer name and user name
Message
 
À
06/05/1999 14:43:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00215819
Message ID:
00215827
Vues:
24
There are two ways and the way to get may be OS dependent:

1.) In NT, two environment variable are set by default:
USERNAME and COMPUTERNAME
Which can be retrieved with GETENV() function

2.) SYS(0)

I like number 1 because I can use it with any OS, but for non NT machines, I have to make sure that the COMPUTERNAME variable is set on each machine and that a server login script is run to set USERNAME

I like #2 because it's simple, but I'm not sure if the result it gives is OS dependent
I try to stay online, to get better information.
I try to get away from the office once in a while..
But they KEEP... PULLING.. ME.. BACK.. IN!!!
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform