Click here to return to the KiXtart HelpDesk main page...

KiXtart Command Reference

INGROUP

action

Checks whether the current user is a member of a group.

syntax

INGROUP ("group name")

parameter

Group name

Identifies the group in which to check the user's membership.

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.

2

The user is a member of a local group with this name.

example

IF INGROUP("Domain Users")

    DISPLAY "z:\users.txt"

ENDIF

IF INGROUP("Developers") = 2

    ? "Member of local group Developers"

ENDIF

IF INGROUP("\\" + @WKSTA + "\Developers") = 2

    ? "Member of local group Developers on local system"

ENDIF