Export (0) Print
Expand All

RegistryKeyPermissionCheck Enumeration

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

Namespace:  Microsoft.Win32
Assembly:  mscorlib (in mscorlib.dll)

type RegistryKeyPermissionCheck

Member nameDescription
DefaultThe 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 ReadSubTree or ReadWriteSubTree mode.
ReadSubTreeSecurity 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 ReadSubTree or ReadWriteSubTree.
ReadWriteSubTreeSecurity 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 ReadWriteSubTree.

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.

Parent key opened with

Current key opened with

Result

Default

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.

Default

ReadSubTree

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

Default

ReadWriteSubTree

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

ReadSubTree

Default or ReadSubTree

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

ReadSubTree

ReadWriteSubTree

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

ReadWriteSubTree

Any

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

The following code example creates a subkey containing 100 key/value pairs and closes it. The example opens the subkey with Default and records the time it takes to read all the values. Then the example opens the subkey with ReadSubTree and records the time it takes to read all the values. Finally, the example computes and displays the percentage improvement.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft