Jump to content
Sign in to follow this  
SumTingWong

InGroup plugin

Recommended Posts

SumTingWong

I finally got round to porting the MemberOf function in Larry's old Au3Xtra.dll to the new AU3 plugin format. In the process, I have renamed it to InGroup, swapped the params around and made the username param optional.

Usage is as follows:

InGroup("groupname")

or

InGroup("groupname", "username")

Returns 1 if user is in group, otherwise 0

If username is omitted then the current username is used.

InGroup searches local groups first, then domain groups. You can prefix a group name with domain name, i.e DOMAIN\Group, to skip the local search.

P.S You need the latest beta.

InGroup.dll

InGroup_src.zip

Edited by SumTingWong

Share this post


Link to post
Share on other sites
blitzkrg

awesome.. thanks alot.. been waiting for this so i can finish my logon script in a3

Share this post


Link to post
Share on other sites
hankjrfan

This could be very useful.

I will try it out when I get the chance.

If this works like I expect it to it will be nothing short of fantastic.

Thanks

Share this post


Link to post
Share on other sites
francesco

I get ERROR: InGroup(): undefined function

I am using 3.1.1.85

Share this post


Link to post
Share on other sites
SumTingWong

I get ERROR: InGroup(): undefined function

I am using 3.1.1.85

This is how you should be calling it:

$handle = PluginOpen(@ScriptDir & "\InGroup.dll")
; user administrator in local group Administrators?
ConsoleWrite(InGroup("Administrators", "administrator") & @LF)
; user SumTingWong in domain group Domain Users?
ConsoleWrite(InGroup("Domain Users", "SumTingWong") & @LF)
PluginClose($handle)

If you are using Scite, just skip the syntax check error.

Edited by SumTingWong

Share this post


Link to post
Share on other sites
busysignal

@SumTingWong, nice add. What program did you use to create your DLL? Just curious..

Cheers.. B)

Share this post


Link to post
Share on other sites
SumTingWong

@SumTingWong, nice add. What program did you use to create your DLL? Just curious..

Cheers.. B)

Dev-C++

Share this post


Link to post
Share on other sites
busysignal

Thanks...

Cheers.. B)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×