IAuditSecurity Method: SetAccessSuccessAudit

 Trustee As String,
 AuditPermissions As String


[in] String Trustee
User or group name for which audit is to be set.

[in] String AuditPermissions
Audit permissions to be set for the Trustee. Refer to Access Permissions for a complete list of audit permissions on a securable object.

Adds "Success" access audit for the specified permissions. This is equivalent to calling SetAccessAudit with "+" prefixed without any prefix before the audit permissions.


Dim AuditSec As IAuditSecurity
Set AuditSec= CreateObject("DirectScript.ObjectSecurity")
'Read the auditing information of the file c:\test.txt
AuditSec.AttachFile "c:\test.txt
'Set Write success "W" audit permissions for "John"
AuditSec.SetAccessSuccessAudit "John", "W"
'Verify if the audit has been set
Debug.Print AuditSec.IsAuditSet("John", "+W")


See Also