Returns information about a network user.
wntUserProps(server-name, user-name, request [, input-format-flag])
(s) server-name: the name of the server on which the function will execute, or a blank string ("") to indicate the current machine.
(s) user-name: the name of a user who has an account on "servername".
(i) request: specifies the information to be returned, See below.
(i) input-format-flag: [optional] controls how the user-name parameter value is interpreted.
Value Meaning
0 (default) user-name of an actual user account name.
1 user-name contains a SID value instead of an actual user account name.
(s) returns a string. See below.
Note: the user-name parameter can be obtained, using the function wntGetUser.
Request specifies the information to be returned, and can be one of the following:
Request |
Returns |
0 |
Username |
1 |
Full name |
2 |
Description |
3 |
User profile path |
4 |
Login script name |
5 |
Home directory |
6 |
Home directory logon drive |
7 |
Privilege level ("GUEST", "USER", or "ADMIN") |
; Load Appropriate Extender AddExtender('wwwnt34i.dll',0,'wwwnt64i.dll')
daserver="\\daserver" user=wntGetUser(@DEFAULT)
response=wntUserProps(daserver, user, 0, 0) Message("The user name is:",response)
response=wntUserProps(daserver, user, 1, 0) Message("The full name is:",response)
response=wntUserProps(daserver, user, 2, 0) Message("The description is:",response)
response=wntUserProps(daserver, user, 3, 0) Message("The user profile path is:",response)
response=wntUserProps(daserver, user, 4, 0) Message("The login script name is:",response)
response=wntUserProps(daserver, user, 5, 0) Message("The home directory is:",response)
response=wntUserProps(daserver, user, 6, 0) Message("The home directory logon drive is:",response)
response=wntUserProps(daserver, user, 7, 0) Message("The Privilege level is:",response)
Message("Finished","Retrieving information about a network user") Exit