How to assign new rights (ACL) to existing registry key without inheriting rights from parent
问题 New rights can be set using RegistryKey.SetAccessControl(new RegistrySecurity(...)) . But after that the inheritance is turned on . Is there a way to assign new rights without turning the inheritance on? The whole code: void test { SecurityIdentifier sidAccUser = new SecurityIdentifier(WellKnownSidType.BuiltinUsersSid, null); NTAccount ntAccUser = sidAccUser.Translate(typeof(NTAccount)) as NTAccount; RegistryAccessRule regAcRule = new RegistryAccessRule( ntAccUser , RegistryRights.FullControl