RegistryPermissionAccess RegistryPermissionAccess RegistryPermissionAccess RegistryPermissionAccess Enum


指定允许的对注册表项和值的访问权。Specifies the permitted access to registry keys and values.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class RegistryPermissionAccess
public enum RegistryPermissionAccess
type RegistryPermissionAccess = 
Public Enum RegistryPermissionAccess


AllAccess AllAccess AllAccess AllAccess 7

对注册表变量的 CreateReadWrite 访问权限。Create, Read, and Write access to registry variables. AllAccess 表示多个 RegistryPermissionAccess 值,如果将它用作 ArgumentException 方法的 access 参数(它需要单一值),则引发 GetPathList(RegistryPermissionAccess)AllAccess represents multiple RegistryPermissionAccess values and causes an ArgumentException when used as the access parameter for the GetPathList(RegistryPermissionAccess) method, which expects a single value.

Create Create Create Create 4

可以创建注册表变量。Create access to registry variables.

NoAccess NoAccess NoAccess NoAccess 0

没有对注册表变量的访问权限。No access to registry variables. NoAccess 不表示有效的 RegistryPermissionAccess 值,如果将它用作 ArgumentException 的参数(它需要单一值),则引发 GetPathList(RegistryPermissionAccess)NoAccess represents no valid RegistryPermissionAccess values and causes an ArgumentException when used as the parameter for GetPathList(RegistryPermissionAccess), which expects a single value.

Read Read Read Read 1

可以读注册表变量。Read access to registry variables.

Write Write Write Write 2

可以写注册表变量。Write access to registry variables.


RegistryPermissionAccess 值是独立的;一种类型的访问权限并不表示对另一个权限。RegistryPermissionAccess values are independent; rights to one type of access do not imply rights to another. 例如,Write权限不表示对权限ReadCreateFor instance, Write permission does not imply permission to Read or Create.


尽管 NoAccess 和 AllAccess 会出现在NoAccess,它们不是有效的参数用作GetPathList因为它们分别描述没有注册表变量访问类型或所有注册表变量访问类型和GetPathList要求单个注册表变量访问类型。Although NoAccess and AllAccess appear in NoAccess, they are not valid for use as the parameter for GetPathList because they describe no registry variable access types or all registry variable access types, respectively, and GetPathList expects a single registry variable access type.