wntMemberSet

Sets the specified user/ or group as a member of the specified group on the specified server.

Syntax:

wntMemberSet(server-name, group-name, user-name or group-name, group-type[, input-format-flag])

Parameters:

(s) server-name: name of a network file server ("\\MYSERVER") or ("") for a local PC.

(s) group-name: name of the group.

(s) user-name/group-name: name of the current user or group

(i) group-type: @LOCALGROUP or @GLOBALGROUP.

(i) input-format-flag: [optional] controls how the group-name and user-name parameter values are interpreted.

Value

Meaning

0

(default) actual name of the user and group.

1

group-name contains a SID value instead of an actual group account name.

2

user-name/group-name contains a SID value instead of an actual user account name.

Returns:

(i) @TRUE if successful; @FALSE if the user is already a member of the group.

 

The person running this script must have sufficient authority to add users/or groups to the specified group.

 

Example:
; Load Appropriate Extender
AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')

rslt=wntMemberSet("","testgroup","jdoe",@LOCALGROUP,0) If rslt    Message("jdoe","is a NEW member of testgroup") Else    Message("jdoe","is ALREADY a member of testgroup") EndIf ;To add a domain globalgroup to a local machine's group AddExtender("WWWNT34i.DLL") rslt=wntMemberSet("\\server", "localgroup", "domain\globalgroup", @LOCALGROUP,0) If rslt    Message("domain\globalgroup","is a NEW member of localgroup") Else    Message("domain\globalgroup","is ALREADY a member of localgroup") EndIf Exit
See Also:

wntMemberDel, wntMemberGet, Extender Limitations