Lists users with accounts on an NT server.
wntUserList( server-name, account-type [, output-format-flag])
(s) server-name: the UNC name of the server on which the function will execute (eg, "\\MYSERVER"), or "" for the local computer.
(i) account-type: specifies the types of user accounts to include. (see below)
(i) output-format-flag: [optional] controls the format of the user names that are returned. See below.
(s) Returns a tab-delimited list of user names.
Note: to list users in a domain, specify a domain controller for that domain as "server-name".
"account-type" specifies the types of user accounts to include. You can specify 0 to include all account types, or specify one or more of the following flags, combined using the bitwise OR ('|') operator:
Flag |
Meaning |
0 |
All account types. |
1 |
Include local user account data on a domain controller. |
2 |
Include global user account data on a computer. |
8 |
Include domain trust account data on a domain controller. |
16 |
Include workstation or member server account data on a domain controller. |
32 |
Include domain controller account data on a domain controller. |
"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 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 user name. In the case of a user account, the pipe "|" delimited records in the TAB delimited list will consist of the account name, full name, comment and user comment. An example of the format would be
|
; Load Appropriate Extender AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
users = wntUserList("",0,1) AskItemlist("List of users with accounts on an NT server.", users,@TAB,@SORTED,@SINGLE) Exit