Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving Windows Group Membership
Message
From
05/04/2007 06:51:38
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01212365
Message ID:
01212369
Views:
14
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform