<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />

RegistryAuditRule

public sealed class RegistryAuditRule : AuditRule
Represents a set of access rights to be audited for a user or group. This class cannot be inherited.

Gets the access rights affected by the audit rule.

public RegistryAuditRule(IdentityReference identity, RegistryRights registryRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)

Initializes a new instance of the RegistryAuditRule class, specifying the user or group to audit, the rights to audit, whether to take inheritance into account, and whether to audit success, failure, or both.

public RegistryAuditRule(string identity, RegistryRights registryRights, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags, AuditFlags flags)

Initializes a new instance of the RegistryAuditRule class, specifying the name of the user or group to audit, the rights to audit, whether to take inheritance into account, and whether to audit success, failure, or both.