Returns tab-delimited list of all user groups on a specified server.
wntListGroups(server-name, group-type [, output-format-flag])
(s) server-name: name of a network file server ("\\MYSERVER") or ("") for a local PC.
(i) group-type: @LOCALGROUP or @GLOBALGROUP.
(i) output-format-flag: [optional] Controls the format of the group name that is returned. See below
(i) a tab-delimited list of user groups.
"output-format-flag" [optional parameter] controls the format of the user names that are returned.
Flag |
Meaning |
0 |
(default) actual user account name. |
1 |
user names will have domain names prefixed on to them, except in cases where the domain name is "BUILTIN" or "NT AUTHORITY". |
2 |
user names will have domain names prefixed on to them in all cases. |
4 |
SID values will be returned in place of user names. |
32 |
display a progress dialog when obtaining a large list of groups or users. This allows the script to show its continuing progress even though the extender function has not yet returned control to the script. |
64 |
force a 1 second delay between updates to the progress dialog box. Note: this flag slows down the processing to be able to see what was going on in the progress dialog |
256 |
allows extended information to be returned along with a group name. In the case of a group [either local or global], the comment [a.k.a. description] that is associated with the group will be returned in the list. The format of the list will still be a TAB delimited list, but each element of the TAB delimited list will be a pipe "|" delimited record containing 2 fields. The first field will be the group name and the second field will be the comment. An example of the format would be:
|
; Load Appropriate Extender AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
localgroups=wntListGroups("",@LOCALGROUP, 1) AskItemlist("Local Groups",localgroups,@TAB,@SORTED,@SINGLE) globalgroups=wntListGroups("",@GLOBALGROUP, 1) AskItemlist("Global Groups",globalgroups,@TAB,@SORTED,@SINGLE) Exit