IAccessList Method: AddAccessEntry

Trustee   As String,
AccessPermissions As String,
AddAccessAllowedAce As  Boolean


[in] String Trustee
User or group name to which the new ACE should belong.

[in] String AccessPermissions
Access permissions that should be added for the new ACE.

See Access Permissions for a complete list of possible permissions.

[in] Boolean AddAccessAllowedAce
Determines the type of ACE to be added. For a Security ACL (DACL), if AddAccessAllowedAce is True then an Access Allowed ACE is added. If it is False, an Access Denied ACE is added. For a System Audit ACL (SACL), if AddAccessAllowedAce is True then a Success Audit ACE is added. If it is False, a Failure Audit ACE is added.

This method adds a new Access Control Entry (ACE) to the current Access Control List (ACL).


Dim ObjSec As IObjectSecurity
Dim AccessList As IaccessList
Set ObjSec = CreateObject("DirectScript.ObjectSecurity")
ObjSec.AttachFile "FileName"
Set AccessList = ObjSec.GetAccessList
AccessList.AddAccessEntry "John", "RX", True


See Also