Microsoft.Win32.RegistryKeyPermissionCheck Enumeration

Specifies whether security checks are performed when opening registry keys and accessing their name/value pairs.

Syntax

public enum RegistryKeyPermissionCheck

Remarks

When an application saves or retrieves a large number of registry settings from a set of subkeys, numerous redundant security checks are performed. This enumeration specifies when security checks on a key are to be omitted.

The following table shows when security checks are performed, based on the way the parent key and the current key are opened.

RegistryKeyPermissionCheck.Default

RegistryKeyPermissionCheck.Default

A security check is performed when accessing any value in the current key, or when attempting to access a subkey. This is the behavior in the .NET Framework versions 1.0 and 1.1.

RegistryKeyPermissionCheck.Default

RegistryKeyPermissionCheck.ReadSubTree

A security check is performed when trying to open the current key.

RegistryKeyPermissionCheck.Default

RegistryKeyPermissionCheck.ReadWriteSubTree

A security check is performed when trying to open the current key.

RegistryKeyPermissionCheck.ReadSubTree

RegistryKeyPermissionCheck.Default or RegistryKeyPermissionCheck.ReadSubTree

No security checks are performed when opening the current key or its values.

RegistryKeyPermissionCheck.ReadSubTree

RegistryKeyPermissionCheck.ReadWriteSubTree

A security check is performed when trying to open the current key.

RegistryKeyPermissionCheck.ReadWriteSubTree

Any

No security checks are performed when opening the current key or its values.

Members

Member NameDescription
Default

The registry key inherits the mode of its parent. Security checks are performed when trying to access subkeys or values, unless the parent was opened with RegistryKeyPermissionCheck.ReadSubTree or RegistryKeyPermissionCheck.ReadWriteSubTree mode.

ReadSubTree

Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with RegistryKeyPermissionCheck.ReadSubTree or RegistryKeyPermissionCheck.ReadWriteSubTree.

ReadWriteSubTree

Security checks are not performed when accessing subkeys or values. A security check is performed when trying to open the current key, unless the parent was opened with RegistryKeyPermissionCheck.ReadWriteSubTree.

Requirements

Namespace: Microsoft.Win32
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0