Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retrieving Windows Group Membership
Message
De
05/04/2007 06:51:38
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
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:
01212369
Vues:
15
>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,
I think you can do it like this:
DECLARE integer IsUserAnAdmin IN shell32.dll
? ( IsUserAnAdmin() # 0 )
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform