RegistryAclExtensions.SetAccessControl(RegistryKey, RegistrySecurity) Method

Definition

Changes the security attributes of an existing registry key.

C#
public static void SetAccessControl(this Microsoft.Win32.RegistryKey key, System.Security.AccessControl.RegistrySecurity registrySecurity);

Parameters

key
RegistryKey

An existing registry key.

registrySecurity
RegistrySecurity

The security information to apply to the registry key.

Applies to

Product Versions
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10