LocalGroup

Description:              This function returns an indication of whether the current Windows™ user is a member of the specified local group. LocalGroup interrogates only local groups, not domain groups.

Returns:                    Numeric

Usage:                       Script or Steady State

Format:                      LocalGroup(Group)

Parameters:             Group    { numeric }  { required }  { no default }

                                      The group parameter, which is a value from 0 to 5. These values are defined in the following table:

Group

Local Group

0

Administrators

1

Backup Operators

2

Guests

3

Power Users

4

Replicator

5

Users

 

Comments:               This function returns an indication of whether the current Windows™ user is a member of the specified local group. Its return values are outlined in the following table:

Return Value

Information

0

Not a member

1

Is a member

2

Not applicable

 

                             Invalid Parameter or internal error

                             The user must log off and log on if a local group was changed for the change to be noticed by the LocalGroup function call. (This behavior is inherent to Windows and is not due to a VTS feature or defect.)

                             Custom local groups (local groups that are not of type Administrators, Backup Operators, Guests, Power Users, Replicator or Users) cannot be interrogated by this function.