Information générale
Catégorie:
Fonctions Windows API
>>Is there a Windows API function that I can use to determine what Groups a User is a member of?
>>
>>I'm talking about the Users and Groups that are in the Windows NT User Manager.
>
>This is easy if ADSI is installed on the machine:
>
>oUser = GETOBJECT("WinNT://SOMEDOMAIN/someusername,User")
>FOR EACH oItem IN oUser.Groups
> ?oItem.Name
>ENDFOR
Thanks.
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.
I will always be doing this on a specific server, is quicker way to get this information locally? Is there some kind of security API like Win32?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement