#162571 - 2006-05-29 05:26 PM
Re: Help!
|
Gargoyle
MM club member
   
Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
|
Quote:
InGroup( )
Action: Checks whether the current user is a member of a group. Syntax: INGROUP ("group name" [<,> "group name 2"], mode) Parameters: Group name, group name 2, group name X… Identifies the group(s) in which to check the user's membership. You may pass multiple group names as arguments -or- a single array who's element(s) are the names of one or more groups to test. Note: This function does not currently support passing multiple arrays as arguments.
Mode
Optional integer parameter indicating whether or not InGroup checks for group membership of one or all groups in the list (default = 0). Possible values:
0 InGroup checks for membership of ONE of the groups in the list (default) 1 InGroup checks for membership of ALL of the groups in the list Remarks: INGROUP can be used to check for groupmembership of groups that exist on the domain or server where the user is logged on, or to check for groupmembership of groups on a specific domain or server. When checking for a local group, INGROUP identifies that the user is indirectly a member of the group by virtue of being a member of a global group which, in turn, is a member of the local group.
If you want to check for membership in a group on a specific domain or server, use the following format:
"OtherDomain\group" –or– "\\SomeServer\group"
For Windows 9x clients, INGROUP works on local groups only if the KiXtart RPC service is running. Returns: 0 The user is not a member of a group with this name 1 The user is a member of a global group with this name See Also: EnumGroup( ), EnumLocalGroup( ), Group Membership Information Examples: If InGroup("Domain Users") DISPLAY "z:\users.txt" EndIf
If InGroup("Developers", "Testers") = 1 ? "Member of Developers OR Testers group" EndIf
If InGroup("Developers", "Testers", 1) = 1 ? "Member of Developers AND Testers group" EndIf
$Array = "Developers", "Testers" If InGroup($Array, 1) = 1 ? "Member of Developers AND Testers group" EndIf
If InGroup("\\" + @WKSTA + "\Developers") = 1 ? "Member of Developers on local system" EndIf
By reading the manual you find that If a user is "NOT" a member of the group {if fnINGROUP("HP 2430") = 0} then it would map that printer for them.
_________________________
Today is the tomorrow you worried about yesterday.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 973 anonymous users online.
|
|
|