Microsoft.Win32.Registry Provides objects that represent the root keys in the Windows registry, and methods to access key/value pairs. Defines the types (or classes) of documents and the properties associated with those types. This field reads the Windows registry base key HKEY_CLASSES_ROOT. Contains configuration information pertaining to the hardware that is not specific to the user. This field reads the Windows registry base key HKEY_CURRENT_CONFIG. Contains information about the current user preferences. This field reads the Windows registry base key HKEY_CURRENT_USER. Contains the configuration data for the local machine. This field reads the Windows registry base key HKEY_LOCAL_MACHINE. Contains performance information for software components. This field reads the Windows registry base key HKEY_PERFORMANCE_DATA. Contains information about the default user configuration. This field reads the Windows registry base key HKEY_USERS. Retrieves the value associated with the specified name, in the specified registry key. If the name is not found in the specified key, returns a default value that you provide, or if the specified key does not exist. The full registry path of the key, beginning with a valid registry root, such as "HKEY_CURRENT_USER". The name of the name/value pair. The value to return if does not exist. The user does not have the permissions required to read from the registry key. The that contains the specified value has been marked for deletion. does not begin with a valid registry root. if the subkey specified by does not exist; otherwise, the value associated with , or if is not found. Sets the specified name/value pair on the specified registry key. If the specified key does not exist, it is created. The full registry path of the key, beginning with a valid registry root, such as "HKEY_CURRENT_USER". The name of the name/value pair. The value to be stored. is . does not begin with a valid registry root. -or- is longer than the maximum length allowed (255 characters). The is read-only, and thus cannot be written to; for example, it is a root-level node. The user does not have the permissions required to create or modify registry keys. Sets the name/value pair on the specified registry key, using the specified registry data type. If the specified key does not exist, it is created. The full registry path of the key, beginning with a valid registry root, such as "HKEY_CURRENT_USER". The name of the name/value pair. The value to be stored. The registry data type to use when storing the data. is . does not begin with a valid registry root. -or- is longer than the maximum length allowed (255 characters). -or- The type of did not match the registry data type specified by , therefore the data could not be converted properly. The is read-only, and thus cannot be written to; for example, it is a root-level node, or the key has not been opened with write access. The user does not have the permissions required to create or modify registry keys. Represents the possible values for a top-level node on a foreign machine. Represents the HKEY_CLASSES_ROOT base key on another computer. This value can be passed to the method, to open this node remotely. Represents the HKEY_CURRENT_CONFIG base key on another computer. This value can be passed to the method, to open this node remotely. Represents the HKEY_CURRENT_USER base key on another computer. This value can be passed to the method, to open this node remotely. Represents the HKEY_LOCAL_MACHINE base key on another computer. This value can be passed to the method, to open this node remotely. Represents the HKEY_PERFORMANCE_DATA base key on another computer. This value can be passed to the method, to open this node remotely. Represents the HKEY_USERS base key on another computer. This value can be passed to the method, to open this node remotely. Represents a key-level node in the Windows registry. This class is a registry encapsulation. 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. The name or path of the subkey to create or open. This string is not case-sensitive. is . The user does not have the permissions required to create or open the registry key. The on which this method is being invoked is closed (closed keys cannot be accessed). The cannot be written to; for example, it was not opened as a writable key , or the user does not have the necessary access rights. The nesting level exceeds 510. -or- A system error occurred, such as deletion of the key, or an attempt to create a key in the root. The newly created subkey, or if the operation failed. If a zero-length string is specified for , the current object is returned. Creates a new subkey or opens an existing subkey for write access, using the specified permission check option. The name or path of the subkey to create or open. This string is not case-sensitive. One of the enumeration values that specifies whether the key is opened for read or read/write access. is . The user does not have the permissions required to create or open the registry key. contains an invalid value. The on which this method is being invoked is closed (closed keys cannot be accessed). The cannot be written to; for example, it was not opened as a writable key, or the user does not have the necessary access rights. The nesting level exceeds 510. -or- A system error occurred, such as deletion of the key, or an attempt to create a key in the root. The newly created subkey, or if the operation failed. If a zero-length string is specified for , the current object is returned. Creates a subkey or opens a subkey for write access, using the specified permission check and registry options. The name or path of the subkey to create or open. One of the enumeration values that specifies whether the key is opened for read or read/write access. The registry option to use; for example, that creates a volatile key. is . The current object is closed (closed keys cannot be accessed). The current object cannot be written to; for example, it was not opened as a writable key, or the user does not have the required access rights. The nesting level exceeds 510. -or- A system error occurred, such as deletion of the key or an attempt to create a key in the root. The user does not have the permissions required to create or open the registry key. The newly created subkey, or if the operation failed. Creates a subkey or opens a subkey for write access, using the specified permission check option, registry option, and registry security. The name or path of the subkey to create or open. One of the enumeration values that specifies whether the key is opened for read or read/write access. The registry option to use. The access control security for the new subkey. is . The current object is closed. Closed keys cannot be accessed. The current object cannot be written to; for example, it was not opened as a writable key, or the user does not have the required access rights. The nesting level exceeds 510. -or- A system error occurred, such as deletion of the key or an attempt to create a key in the root. The user does not have the permissions required to create or open the registry key. The newly created subkey, or if the operation failed. Creates a new subkey or opens an existing subkey for write access, using the specified permission check option and registry security. The name or path of the subkey to create or open. This string is not case-sensitive. One of the enumeration values that specifies whether the key is opened for read or read/write access. The access control security for the new key. is . The user does not have the permissions required to create or open the registry key. contains an invalid value. The on which this method is being invoked is closed (closed keys cannot be accessed). The current cannot be written to; for example, it was not opened as a writable key, or the user does not have the necessary access rights. The nesting level exceeds 510. -or- A system error occurred, such as deletion of the key, or an attempt to create a key in the root. The newly created subkey, or if the operation failed. If a zero-length string is specified for , the current object is returned. Creates a new subkey or opens an existing subkey with the specified access. Available starting with .NET Framework 4.6. The name or path of the subkey to create or open. This string is not case-sensitive. to indicate the new subkey is writable; otherwise, . is . The user does not have the permissions required to create or open the registry key. The current cannot be written to; for example, it was not opened as a writable key, or the user does not have the necessary access rights. The nesting level exceeds 510. -or- A system error occurred, such as deletion of the key, or an attempt to create a key in the root. The newly created subkey, or if the operation failed. If a zero-length string is specified for , the current object is returned. Creates a new subkey or opens an existing subkey with the specified access. Available starting with .NET Framework 4.6. The name or path of the subkey to create or open. This string is not case-sensitive. to indicate the new subkey is writable; otherwise, . The registry option to use. is . does not specify a valid Option The user does not have the permissions required to create or open the registry key. The current cannot be written to; for example, it was not opened as a writable key, or the user does not have the necessary access rights. The nesting level exceeds 510. -or- A system error occurred, such as deletion of the key, or an attempt to create a key in the root. The newly created subkey, or if the operation failed. If a zero-length string is specified for , the current object is returned. Deletes the specified subkey. The name of the subkey to delete. This string is not case-sensitive. The has child subkeys The parameter does not specify a valid registry key is The user does not have the permissions required to delete the key. The being manipulated is closed (closed keys cannot be accessed). The user does not have the necessary registry rights. Deletes the specified subkey, and specifies whether an exception is raised if the subkey is not found. The name of the subkey to delete. This string is not case-sensitive. Indicates whether an exception should be raised if the specified subkey cannot be found. If this argument is and the specified subkey does not exist, an exception is raised. If this argument is and the specified subkey does not exist, no action is taken. has child subkeys. does not specify a valid registry key, and is . is . The user does not have the permissions required to delete the key. The being manipulated is closed (closed keys cannot be accessed). The user does not have the necessary registry rights. Deletes a subkey and any child subkeys recursively. The subkey to delete. This string is not case-sensitive. is . Deletion of a root hive is attempted. -or- does not specify a valid registry subkey. An I/O error has occurred. The user does not have the permissions required to delete the key. The being manipulated is closed (closed keys cannot be accessed). The user does not have the necessary registry rights. Deletes the specified subkey and any child subkeys recursively, and specifies whether an exception is raised if the subkey is not found. The name of the subkey to delete. This string is not case-sensitive. Indicates whether an exception should be raised if the specified subkey cannot be found. If this argument is and the specified subkey does not exist, an exception is raised. If this argument is and the specified subkey does not exist, no action is taken. An attempt was made to delete the root hive of the tree. -or- does not specify a valid registry subkey, and is . is . The is closed (closed keys cannot be accessed). The user does not have the necessary registry rights. The user does not have the permissions required to delete the key. Deletes the specified value from this key. The name of the value to delete. is not a valid reference to a value. The user does not have the permissions required to delete the value. The being manipulated is closed (closed keys cannot be accessed). The being manipulated is read-only. Deletes the specified value from this key, and specifies whether an exception is raised if the value is not found. The name of the value to delete. Indicates whether an exception should be raised if the specified value cannot be found. If this argument is and the specified value does not exist, an exception is raised. If this argument is and the specified value does not exist, no action is taken. is not a valid reference to a value and is . -or- is . The user does not have the permissions required to delete the value. The being manipulated is closed (closed keys cannot be accessed). The being manipulated is read-only. Releases all resources used by the current instance of the class. Writes all the attributes of the specified open registry key into the registry. Creates a registry key from a specified handle. The handle to the registry key. is . The user does not have the necessary registry rights. The user does not have the permissions required to perform this action. A registry key. Creates a registry key from a specified handle and registry view setting. The handle to the registry key. The registry view to use. is invalid. is . The user does not have the necessary registry rights. The user does not have the permissions required to perform this action. A registry key. Returns the access control security for the current registry key. The user does not have the necessary permissions. The being manipulated is closed (closed keys cannot be accessed). The current key has been deleted. An object that describes the access control permissions on the registry key represented by the current . Returns the specified sections of the access control security for the current registry key. A bitwise combination of enumeration values that specifies the type of security information to get. The user does not have the necessary permissions. The being manipulated is closed (closed keys cannot be accessed). The current key has been deleted. An object that describes the access control permissions on the registry key represented by the current . Retrieves an array of strings that contains all the subkey names. The user does not have the permissions required to read from the key. The being manipulated is closed (closed keys cannot be accessed). The user does not have the necessary registry rights. A system error occurred, for example the current key has been deleted. An array of strings that contains the names of the subkeys for the current key. Retrieves the value associated with the specified name. Returns if the name/value pair does not exist in the registry. The name of the value to retrieve. This string is not case-sensitive. The user does not have the permissions required to read from the registry key. The that contains the specified value is closed (closed keys cannot be accessed). The that contains the specified value has been marked for deletion. The user does not have the necessary registry rights. The value associated with , or if is not found. Retrieves the value associated with the specified name. If the name is not found, returns the default value that you provide. The name of the value to retrieve. This string is not case-sensitive. The value to return if does not exist. The user does not have the permissions required to read from the registry key. The that contains the specified value is closed (closed keys cannot be accessed). The that contains the specified value has been marked for deletion. The user does not have the necessary registry rights. The value associated with , with any embedded environment variables left unexpanded, or if is not found. Retrieves the value associated with the specified name and retrieval options. If the name is not found, returns the default value that you provide. The name of the value to retrieve. This string is not case-sensitive. The value to return if does not exist. One of the enumeration values that specifies optional processing of the retrieved value. The user does not have the permissions required to read from the registry key. The that contains the specified value is closed (closed keys cannot be accessed). The that contains the specified value has been marked for deletion. is not a valid value; for example, an invalid value is cast to . The user does not have the necessary registry rights. The value associated with , processed according to the specified , or if is not found. Retrieves the registry data type of the value associated with the specified name. The name of the value whose registry data type is to be retrieved. This string is not case-sensitive. The user does not have the permissions required to read from the registry key. The that contains the specified value is closed (closed keys cannot be accessed). The subkey that contains the specified value does not exist. -or- The name/value pair specified by does not exist. This exception is not thrown on Windows 95, Windows 98, or Windows Millennium Edition. The user does not have the necessary registry rights. The registry data type of the value associated with . Retrieves an array of strings that contains all the value names associated with this key. The user does not have the permissions required to read from the registry key. The being manipulated is closed (closed keys cannot be accessed). The user does not have the necessary registry rights. A system error occurred; for example, the current key has been deleted. An array of strings that contains the value names for the current key. Opens a new that represents the requested key on the local machine with the specified view. The HKEY to open. The registry view to use. or is invalid. The user does not have the necessary registry rights. The user does not have the permissions required to perform this action. The requested registry key. Opens a new that represents the requested key on a remote machine. The HKEY to open, from the enumeration. The remote machine. is invalid. is not found. is . The user does not have the proper permissions to perform this operation. The user does not have the necessary registry rights. The requested registry key. Opens a new registry key that represents the requested key on a remote machine with the specified view. The HKEY to open from the enumeration. The remote machine. The registry view to use. or is invalid. is not found. is . The user does not have the necessary registry rights. The user does not have the required permissions to perform this operation. The requested registry key. Retrieves a subkey as read-only. The name or path of the subkey to open as read-only. is The is closed (closed keys cannot be accessed). The user does not have the permissions required to read the registry key. The subkey requested, or if the operation failed. Retrieves the specified subkey for read or read/write access. The name or path of the subkey to create or open. One of the enumeration values that specifies whether the key is opened for read or read/write access. is contains an invalid value. The is closed (closed keys cannot be accessed). The user does not have the permissions required to read the registry key. The subkey requested, or if the operation failed. Retrieves the specified subkey for read or read/write access, requesting the specified access rights. The name or path of the subkey to create or open. One of the enumeration values that specifies whether the key is opened for read or read/write access. A bitwise combination of enumeration values that specifies the desired security access. is contains an invalid value. The is closed (closed keys cannot be accessed). includes invalid registry rights values. -or- The user does not have the requested permissions. The subkey requested, or if the operation failed. Retrieves a specified subkey, and specifies whether write access is to be applied to the key. Name or path of the subkey to open. Set to if you need write access to the key. is . The is closed (closed keys cannot be accessed). The user does not have the permissions required to access the registry key in the specified mode. The subkey requested, or if the operation failed. Retrieves a subkey with the specified name and access rights. Available starting with .NET Framework 4.6. The name or path of the subkey to create or open. The rights for the registry key. is . The is closed (closed keys cannot be accessed). The user does not have the permissions required to access the registry key in the specified mode. The subkey requested, or if the operation failed. Applies Windows access control security to an existing registry key. The access control security to apply to the current subkey. The current object represents a key with access control security, and the caller does not have rights. is . The being manipulated is closed (closed keys cannot be accessed). Sets the specified name/value pair. The name of the value to store. The data to be stored. is . is an unsupported data type. The that contains the specified value is closed (closed keys cannot be accessed). The is read-only, and cannot be written to; for example, the key has not been opened with write access. -or- The object represents a root-level node, and the operating system is Windows Millennium Edition or Windows 98. The user does not have the permissions required to create or modify registry keys. The object represents a root-level node, and the operating system is Windows 2000, Windows XP, or Windows Server 2003. Sets the value of a name/value pair in the registry key, using the specified registry data type. The name of the value to be stored. The data to be stored. The registry data type to use when storing the data. is . The type of did not match the registry data type specified by , therefore the data could not be converted properly. The that contains the specified value is closed (closed keys cannot be accessed). The is read-only, and cannot be written to; for example, the key has not been opened with write access. -or- The object represents a root-level node, and the operating system is Windows Millennium Edition or Windows 98. The user does not have the permissions required to create or modify registry keys. The object represents a root-level node, and the operating system is Windows 2000, Windows XP, or Windows Server 2003. Retrieves a string representation of this key. The being accessed is closed (closed keys cannot be accessed). A string representing the key. If the specified key is invalid (cannot be found) then is returned. Gets a object that represents the registry key that the current object encapsulates. The registry key is closed. Closed keys cannot be accessed. The user does not have the necessary registry rights. A system error occurred, such as deletion of the current key. The user does not have the permissions required to read the key. The handle to the registry key. Retrieves the name of the key. The is closed (closed keys cannot be accessed). The absolute (qualified) name of the key. Retrieves the count of subkeys of the current key. The user does not have read permission for the key. The being manipulated is closed (closed keys cannot be accessed). The user does not have the necessary registry rights. A system error occurred, for example the current key has been deleted. The number of subkeys of the current key. Retrieves the count of values in the key. The user does not have read permission for the key. The being manipulated is closed (closed keys cannot be accessed). The user does not have the necessary registry rights. A system error occurred, for example the current key has been deleted. The number of name/value pairs in the key. Gets the view that was used to create the registry key. The view that was used to create the registry key. -or- , if no view was used. Specifies whether security checks are performed when opening registry keys and accessing their name/value pairs. 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 or mode. 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 or . 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 . Specifies options to use when creating a registry key. A non-volatile key. This is the default. A volatile key. The information is stored in memory and is not preserved when the corresponding registry hive is unloaded. Specifies the data types to use when storing values in the registry, or identifies the data type of a value in the registry. Binary data in any form. This value is equivalent to the Windows API registry data type REG_BINARY. A 32-bit binary number. This value is equivalent to the Windows API registry data type REG_DWORD. A null-terminated string that contains unexpanded references to environment variables, such as %PATH%, that are expanded when the value is retrieved. This value is equivalent to the Windows API registry data type REG_EXPAND_SZ. An array of null-terminated strings, terminated by two null characters. This value is equivalent to the Windows API registry data type REG_MULTI_SZ. No data type. A 64-bit binary number. This value is equivalent to the Windows API registry data type REG_QWORD. A null-terminated string. This value is equivalent to the Windows API registry data type REG_SZ. An unsupported registry data type. For example, the Microsoft Windows API registry data type REG_RESOURCE_LIST is unsupported. Use this value to specify that the method should determine the appropriate registry data type when storing a name/value pair. Specifies optional behavior when retrieving name/value pairs from a registry key. A value of type is retrieved without expanding its embedded environment variables. No optional behavior is specified. Specifies which registry view to target on a 64-bit operating system. The default view. The 32-bit view. The 64-bit view. Represents a safe handle to the Windows registry. Initializes a new instance of the class. An object that represents the pre-existing handle to use. to reliably release the handle during the finalization phase; to prevent reliable release. Represents a set of access rights allowed or denied for a user or group. This class cannot be inherited. Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. The user or group the rule applies to. Must be of type or a type such as that can be converted to type . A bitwise combination of values indicating the rights allowed or denied. One of the values indicating whether the rights are allowed or denied. specifies an invalid value. -or- specifies an invalid value. is . -or- is zero. is neither of type nor of a type such as that can be converted to type . Initializes a new instance of the class, specifying the user or group the rule applies to, the access rights, the inheritance flags, the propagation flags, and whether the specified access rights are allowed or denied. The user or group the rule applies to. Must be of type or a type such as that can be converted to type . A bitwise combination of values specifying the rights allowed or denied. A bitwise combination of flags specifying how access rights are inherited from other objects. A bitwise combination of flags specifying how access rights are propagated to other objects. One of the values specifying whether the rights are allowed or denied. specifies an invalid value. -or- specifies an invalid value. -or- specifies an invalid value. -or- specifies an invalid value. is . -or- is zero. is neither of type , nor of a type such as that can be converted to type . Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, and whether the specified access rights are allowed or denied. The name of the user or group the rule applies to. A bitwise combination of values indicating the rights allowed or denied. One of the values indicating whether the rights are allowed or denied. specifies an invalid value. -or- specifies an invalid value. is zero. is . -or- is a zero-length string. -or- is longer than 512 characters. Initializes a new instance of the class, specifying the name of the user or group the rule applies to, the access rights, the inheritance flags, the propagation flags, and whether the specified access rights are allowed or denied. The name of the user or group the rule applies to. A bitwise combination of values indicating the rights allowed or denied. A bitwise combination of flags specifying how access rights are inherited from other objects. A bitwise combination of flags specifying how access rights are propagated to other objects. One of the values specifying whether the rights are allowed or denied. specifies an invalid value. -or- specifies an invalid value. -or- specifies an invalid value. -or- specifies an invalid value. is zero. is . -or- is a zero-length string. -or- is longer than 512 characters. Gets the rights allowed or denied by the access rule. A bitwise combination of values indicating the rights allowed or denied by the access rule. Represents a set of access rights to be audited for a user or group. This class cannot be inherited. Initializes a new instance of the class, specifying the user or group to audit, the rights to audit, whether to take inheritance into account, and whether to audit success, failure, or both. The user or group the rule applies to. Must be of type or a type such as that can be converted to type . A bitwise combination of values specifying the kinds of access to audit. A bitwise combination of values specifying whether the audit rule applies to subkeys of the current key. A bitwise combination of values that affect the way an inherited audit rule is propagated to subkeys of the current key. A bitwise combination of values specifying whether to audit success, failure, or both. specifies an invalid value. -or- specifies an invalid value. -or- specifies an invalid value. -or- specifies an invalid value. is . -or- is zero. is neither of type nor of a type such as that can be converted to type . Initializes a new instance of the class, specifying the name of the user or group to audit, the rights to audit, whether to take inheritance into account, and whether to audit success, failure, or both. The name of the user or group the rule applies to. A bitwise combination of values specifying the kinds of access to audit. A combination of flags that specifies whether the audit rule applies to subkeys of the current key. A combination of flags that affect the way an inherited audit rule is propagated to subkeys of the current key. A bitwise combination of values specifying whether to audit success, failure, or both. specifies an invalid value. -or- specifies an invalid value. -or- specifies an invalid value. -or- specifies an invalid value. is zero. is . -or- is a zero-length string. -or- is longer than 512 characters. Gets the access rights affected by the audit rule. A bitwise combination of values that indicates the rights affected by the audit rule. Specifies the access control rights that can be applied to registry objects. The right to change the access rules and audit rules associated with a registry key. Reserved for system use. The right to create subkeys of a registry key. The right to delete a registry key. The right to list the subkeys of a registry key. Same as . The right to exert full control over a registry key, and to modify its access rules and audit rules. The right to request notification of changes on a registry key. The right to query the name/value pairs in a registry key. The right to query the name/value pairs in a registry key, to request notification of changes, to enumerate its subkeys, and to read its access rules and audit rules. The right to open and copy the access rules and audit rules for a registry key. The right to create, delete, or set name/value pairs in a registry key. The right to change the owner of a registry key. The right to create, delete, and set the name/value pairs in a registry key, to create or delete subkeys, to request notification of changes, to enumerate its subkeys, and to read its access rules and audit rules. Represents the Windows access control security for a registry key. This class cannot be inherited. Initializes a new instance of the class with default values. Creates a new access control rule for the specified user, with the specified access rights, access control, and flags. An that identifies the user or group the rule applies to. A bitwise combination of values specifying the access rights to allow or deny, cast to an integer. A Boolean value specifying whether the rule is inherited. A bitwise combination of values specifying how the rule is inherited by subkeys. A bitwise combination of values that modify the way the rule is inherited by subkeys. Meaningless if the value of is . One of the values specifying whether the rights are allowed or denied. , , , or specifies an invalid value. is . -or- is zero. is neither of type , nor of a type such as that can be converted to type . A object representing the specified rights for the specified user. Searches for a matching access control with which the new rule can be merged. If none are found, adds the new rule. The access control rule to add. is . Searches for an audit rule with which the new rule can be merged. If none are found, adds the new rule. The audit rule to add. The user specified by this rule determines the search. Creates a new audit rule, specifying the user the rule applies to, the access rights to audit, the inheritance and propagation of the rule, and the outcome that triggers the rule. An that identifies the user or group the rule applies to. A bitwise combination of values specifying the access rights to audit, cast to an integer. A Boolean value specifying whether the rule is inherited. A bitwise combination of values specifying how the rule is inherited by subkeys. A bitwise combination of values that modify the way the rule is inherited by subkeys. Meaningless if the value of is . A bitwise combination of values specifying whether to audit successful access, failed access, or both. , , , or specifies an invalid value. is . -or- is zero. is neither of type , nor of a type such as that can be converted to type . A object representing the specified audit rule for the specified user, with the specified flags. The return type of the method is the base class, , but the return value can be cast safely to the derived class. Searches for an access control rule with the same user and (allow or deny) as the specified access rule, and with compatible inheritance and propagation flags; if such a rule is found, the rights contained in the specified access rule are removed from it. A that specifies the user and to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. is . if a compatible rule is found; otherwise . Searches for all access control rules with the same user and (allow or deny) as the specified rule and, if found, removes them. A that specifies the user and to search for. Any rights, inheritance flags, or propagation flags specified by this rule are ignored. is . Searches for an access control rule that exactly matches the specified rule and, if found, removes it. The to remove. is . Searches for an audit control rule with the same user as the specified rule, and with compatible inheritance and propagation flags; if a compatible rule is found, the rights contained in the specified rule are removed from it. A that specifies the user to search for, and a set of inheritance and propagation flags that a matching rule, if found, must be compatible with. Specifies the rights to remove from the compatible rule, if found. is . if a compatible rule is found; otherwise, . Searches for all audit rules with the same user as the specified rule and, if found, removes them. A that specifies the user to search for. Any rights, inheritance flags, or propagation flags specified by this rule are ignored. is . Searches for an audit rule that exactly matches the specified rule and, if found, removes it. The to be removed. is . Removes all access control rules with the same user as the specified rule, regardless of , and then adds the specified rule. The to add. The user specified by this rule determines the rules to remove before this rule is added. Removes all access control rules with the same user and (allow or deny) as the specified rule, and then adds the specified rule. The to add. The user and of this rule determine the rules to remove before this rule is added. is . Removes all audit rules with the same user as the specified rule, regardless of the value, and then adds the specified rule. The to add. The user specified by this rule determines the rules to remove before this rule is added. is . Gets the enumeration type that the class uses to represent access rights. A object representing the enumeration. Gets the type that the class uses to represent access rules. A object representing the class. Gets the type that the class uses to represent audit rules. A object representing the class.