Hello,
I'm trying to get all audit rules for one file like so:
Dim fi As New FileInfo("C:\HostMonitorLog.txt")
Dim fs As New FileSecurity
Dim typeToGet As Type
fs = fi.GetAccessControl()
typeToGet = Type.GetType("System.Security.Principal.NTAccount")
For Each rule As FileSystemAuditRule In fs.GetAuditRules(True, True,
typeToGet)
Debug.Print(rule.IdentityReference.Value)
Next
However GetAuditRules is returning an empty collection. What am I missing?
I do have auditing enabled via my local security policy and I am admin on
the box.
Thanks,
Dan
dan artuso - 05 Dec 2007 20:46 GMT
Hi,
In case anyone else runs into this:
fs = fi.GetAccessControl(AccessControlSections.Audit)
Dan
> Hello,
> I'm trying to get all audit rules for one file like so:
[quoted text clipped - 22 lines]
> Thanks,
> Dan