![[About]](r:\html\lsrxabout.gif)
![[Toc]](r:\html\lsrxtoc.gif)
0.9b (c) 1995 Peter Childs
The function adds a logon assignment for a userid.
Syntax
MyRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId)
Parameters
The parameters required are:
DcName The domain controller computer name
aliasName The name of the alias to be assigned
LocalName The device that will be assigned to the resource specified by
aliasName when the user logs on. Valid drive letters are A
through Z. The drive letter can be followed by a colon (:),
but a colon is not required. A value of * indicates that the
system will choose the first available drive. Valid print
devices are LPT1 through LPT9. Valid serial devices are LPT1
through LPT9 and COM1 through COM9. Print and serial devices
should not be followed by a colon (that is, COM1: is
considered to be an invalid serial device). If the device
field is left blank, the connection is to be deviceless.
UserId The name of the userid
Note
The domain controller computer name can be specified as '' for a local domain controller.
If the logon assignment already is in the list, the additional assignment will not be added.
Example
/* Add a logon assignment for a userid */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETLOGONASN = 52 DcName = '\\ILIDC' aliasName = 'BOOKS' LocalName = 'W' UserId = 'WS2221' myRc = NetAdd(NETLOGONASN, DcName, aliasName, LocalName, UserId) if myRc <> '0' then do say 'Got error from NetAdd() ' myRc call DropLsRxutFuncs exit 9 end else do say say "Logon assignment added successfully" end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit 0
Example Output
Logon assignment added successfully
Inf-HTML End Run - Successful