Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieving Windows Group Membership
Message
 
À
05/04/2007 08:24:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Divers
Thread ID:
01212365
Message ID:
01212869
Vues:
19
>If you only want to know what domain group users are a member of, I have VFP code for that. If you want to know what permissions each group has, I haven't gotten that far yet... If you find a better solution, please share it. I'd love to know it. If I remember correctly, I am passing the login and password to pull the group memberships and if you pass an invalid password 3 times, the account is locked. I can't remember now if I ever resolved that or not. I'll check when I get on the other machine which has the code.

The easiest way is probably via WMI or ADSI. Those admin objects provide all that information in an easy to access manner. You can find many VB samples for the admin of this stuff online and it should be easy to translate for the most part..

I got what I needed from the IsUserAnAdmin() call which works perfect for what I need on Vista and detecting pseudo-Admin mode...


+++ Rick ---



>
>
>>Hey all,
>>
>>Looking for a way to get group membership for a windows user. Specifically I need to know whether a user is an Admnistrator in order to take appropriate action.
>>
>>I know I can use ADSI, but that's a little problematic because I may not even have rights to do that...
>>
>>Before I go off and hack this - like trying to read a reg key in HKLM which won't work with an Admin account - I'd like to get this officially if possible...
>>
>>Any ideas?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform