Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows NT Users and Groups
Message
De
30/08/2000 23:07:15
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00409329
Message ID:
00411150
Vues:
22
>>>>oUser = GETOBJECT("WinNT://SOMEDOMAIN/someusername,User")
>>
>>>I tried this, and there was about a 20 second delay before it found the groups. I suspect it was searching the network for other servers in the domain (I used a server name for SOMEDOMAIN, was this OK?) before it returned an answer. Subsequent requests were nearly instantaneous.
>>
>>You can narrow the search for the computer by qualifying it with a domain or workgroup:
>>
>>oUser = GETOBJECT("WinNT://MYDOMAIN/MYCOMPUTER/someusername,User")
>
>Cool. Is there a way to determine what domain my computer is in? I'm writing a web app, and I can get the computer name from the system variables on the web server, but I don't know how to get the domain.

Maybe not the fastest, but the easiest way IMO is:

oNet = CREATEOBJECT("WScript.NetWork")
lcDomainName = oNet.UserDomain
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform