RegistryKey
Represents a key-level node in the Windows registry. This class is a registry encapsulation.
Gets a SafeRegistryHandle object that represents the registry key that the current RegistryKey object encapsulates.
Retrieves the name of the key.
Retrieves the count of subkeys of the current key.
Retrieves the count of values in the key.
Gets the view that was used to create the registry key.
Creates a registry key from a specified handle.
Creates a registry key from a specified handle and registry view setting.
Opens a new RegistryKey that represents the requested key on the local machine with the specified view.
Opens a new RegistryKey that represents the requested key on a remote machine.
public static RegistryKey OpenRemoteBaseKey(RegistryHive hKey, string machineName, RegistryView view)
Opens a new registry key that represents the requested key on a remote machine with the specified view.
Closes the key and flushes it to disk if its contents have been modified.
Creates a new subkey or opens an existing subkey for write access.
Creates a new subkey or opens an existing subkey with the specified access. Available starting with .NET Framework 4.6.
Creates a new subkey or opens an existing subkey with the specified access. Available starting with .NET Framework 4.6.
Creates a new subkey or opens an existing subkey for write access, using the specified permission check option.
public RegistryKey CreateSubKey(string subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions, RegistrySecurity registrySecurity)
Creates a subkey or opens a subkey for write access, using the specified permission check option, registry option, and registry security.
public RegistryKey CreateSubKey(string subkey, RegistryKeyPermissionCheck permissionCheck, RegistrySecurity registrySecurity)
Creates a new subkey or opens an existing subkey for write access, using the specified permission check option and registry security.
public RegistryKey CreateSubKey(string subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions)
Creates a subkey or opens a subkey for write access, using the specified permission check and registry options.
Deletes the specified subkey.
Deletes the specified subkey, and specifies whether an exception is raised if the subkey is not found.
Deletes a subkey and any child subkeys recursively.
Deletes the specified subkey and any child subkeys recursively, and specifies whether an exception is raised if the subkey is not found.
Deletes the specified value from this key.
Deletes the specified value from this key, and specifies whether an exception is raised if the value is not found.
Releases all resources used by the current instance of the RegistryKey class.
Writes all the attributes of the specified open registry key into the registry.
Returns the access control security for the current registry key.
Returns the specified sections of the access control security for the current registry key.
Retrieves an array of strings that contains all the subkey names.
Retrieves the value associated with the specified name. Returns null if the name/value pair does not exist in the registry.
Retrieves the value associated with the specified name. If the name is not found, returns the default value that you provide.
Retrieves the value associated with the specified name and retrieval options. If the name is not found, returns the default value that you provide.
Retrieves the registry data type of the value associated with the specified name.
Retrieves an array of strings that contains all the value names associated with this key.
Retrieves a subkey as read-only.
Retrieves a specified subkey, and specifies whether write access is to be applied to the key.
Retrieves the specified subkey for read or read/write access.
Retrieves a subkey with the specified name and access rights. Available starting with .NET Framework 4.6.
public RegistryKey OpenSubKey(string name, RegistryKeyPermissionCheck permissionCheck, RegistryRights rights)
Retrieves the specified subkey for read or read/write access, requesting the specified access rights.
Applies Windows access control security to an existing registry key.
Sets the specified name/value pair.
Sets the value of a name/value pair in the registry key, using the specified registry data type.