The StdRegProv class contains methods that interact with the system registry. You can use these methods to:
Verify the access permissions for a user
Create, enumerate, and delete registry keys
Create, enumerate, and delete named values
Read, write, and delete data values
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Contains the key to be verified. '}
uRequired
uint32
2
✓
-
{'Description':'Optional parameter that specifies the access permissions to be verified. You can add these values together to verify more than one access permission. The default value is 3. The following access permission values are defined in Winnt.h: KEY_QUERY_VALUE (0X0001) KEY_SET_VALUE (0X0002) KEY_CREATE_SUB_KEY (0X0004) KEY_ENUMERATE_SUB_KEYS (0X0008) KEY_NOTIFY (0X0010) KEY_CREATE_LINK (0X0020) DELETE (0x00010000) READ_CONTROL (0x00020000) WRITE_DAC (0X00040000) WRITE_OWNER (0X00080000) ','in':True}
bGranted
boolean
3
-
✓
{'Description':'This parameter is True if user possesses the specified access permissions. Otherwise, the parameter is False. ','out':True}
Description
'The CheckAccess method verifies that the user possesses the specified permissions. The method returns a uint32 which is 0 if successful or some other value if any other error occurred.'
implemented
True
static
True
CheckAccess method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Contains the key to be created. The CreateKey method creates all subkeys specified in the path that do not exist. For example, if MyKey and MySubKey do not exist in the following path, CreateKey creates both keys: HKEY_LOCAL_MACHINE\SOFTWARE\MyKey\MySubKey '}
Description
'The CreateKey method creates a subkey in the specified tree. '
implemented
True
static
True
CreateKey method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Contains the key to be deleted. '}
Description
'The DeleteKey method deletes a subkey in the specified tree. '
implemented
True
static
True
DeleteKey method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the key that contains the named value to be deleted. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value to be deleted from the subkey. Specify an empty string to delete the default named value (the default named value is not deleted its value is set to "value not set"','in':True}
Description
'The DeleteValue method deletes a named value in the specified subkey.'
implemented
True
static
True
DeleteValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the path that contains the subkeys to be enumerated. '}
sNames
string
2
-
✓
{'Description':'Contains an array of subkey strings. ','out':True}
Description
'The EnumKey method enumerates the subkeys for the given path. '
implemented
True
static
True
EnumKey method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the path that contains the named values to be enumerated. '}
sNames
string
2
-
✓
{'Description':'Contains an array of named value strings. The elements of this array correspond directly with the elements of iTypes. ','out':True}
Types
sint32
3
-
✓
{'Description':'Contains an array of data value types (integers). You can use these types to determine which Get method to call. For example, if the data value type is REG_SZ, you would call GetStringValue to retrieve the named value's data value. The elements of this array correspond directly with the elements of sNames. The following data value types are defined in Winnt.h: REG_SZ (1) REG_EXPAND_SZ (2) REG_BINARY (3) REG_DWORD (4) REG_MULTI_SZ (7) ','out':True}
Description
'The EnumValues method enumerates the named values of the given subkey. '
implemented
True
static
True
EnumValues method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the path that contains the named values. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are retrieving. Specify an empty string to get the default named value. ','in':True}
uValue
uint8
3
-
✓
{'Description':'Contains an array of binary bytes. ','out':True}
Description
'The GetBinaryValue method returns the data value for a named value whose data type is REG_BINARY. The GetBinaryValue method returns a uint32 which is 0 if successful or some other value if any other error occurred.'
implemented
True
static
True
GetBinaryValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the path that contains the named values. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are retrieving. Specify an empty string to get the default named value.','in':True}
uValue
uint32
3
-
✓
{'Description':'Contains the DWORD data value for the named value. ','out':True}
Description
'The GetDWORDValue method returns the data value for a named value whose data type is REG_DWORD. '
implemented
True
static
True
GetDWORDValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the path that contains the named values. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are retrieving. Specify an empty string to get the default named value. ','in':True}
sValue
string
3
-
✓
{'Description':'Contains the expanded string data value for the named value. The string is only expanded if the environment variable (for example, %Path%) is defined. ','out':True}
Description
'The GetExpandedStringValue method returns the data value for a named value whose data type is REG_EXPAND_SZ. '
implemented
True
static
True
GetExpandedStringValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the path that contains the named values. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are retrieving. Specify an empty string to get the default named value. ','in':True}
sValue
string
3
-
✓
{'Description':'Contains an array of string data values for the named value. ','out':True}
Description
'The GetMultiStringValue method returns the data value for a named value whose data type is REG_MULTI_SZ. The GetMultiStringValue method returns a uint32 which is 0 if successful or some other value if any other error occurred.'
implemented
True
static
True
GetMultiStringValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the path that contains the named values. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are retrieving. Specify an empty string to get the default named value.','in':True}
uValue
uint64
3
-
✓
{'Description':'Contains the DWORD data value for the named value. ','out':True}
Description
'The GetQWORDValue method returns the data value for a named value whose data type is REG_QWORD. '
implemented
True
static
True
GetQWORDValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) '}
sSubKeyName
string
1
✓
-
{'Description':'Contains the key name to get the security descriptor for. '}
{'Description':'Returns the security descriptor from the key name. '}
Description
'The GetSecurityDescriptor method returns the specified key's security descriptor in a __SecurityDescriptor. The method returns a uint32 which is 0 if successful or some other value if any other error occurred.'
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the path that contains the named values. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are retrieving. Specify an empty string to get the default named value. ','in':True}
sValue
string
3
-
✓
{'Description':'Contains the string data value for the named value. ','out':True}
Description
'The GetStringValue method returns the data value for a named value whose data type is REG_SZ. '
implemented
True
static
True
GetStringValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the key that contains the named value to be set. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are setting. You can specify an existing named value (update) or a new named value (create). Specify an empty string to set the data value for the default named value. ','in':True}
uValue
uint8
3
✓
-
{'Description':'Specifies an array of binary data values. ','in':True}
Description
'The SetBinaryValue method sets the data value for a named value whose data type is REG_BINARY. The SetBinaryValue method returns a uint32 which is 0 if successful or some other value if any other error occurred.'
implemented
True
static
True
SetBinaryValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the key that contains the named value to be set. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are setting. You can specify an existing named value (update) or a new named value (create). Specify an empty string to set the data value for the default named value. ','in':True}
uValue
uint32
3
✓
-
{'Description':'Specifies a double word data value. ','in':True}
Description
'The SetDWORDValue method sets the data value for a named value whose data type is REG_BINARY. '
implemented
True
static
True
SetDWORDValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the key that contains the named value to be set. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are setting. You can specify an existing named value (update) or a new named value (create). Specify an empty string to set the data value for the default named value. ','in':True}
sValue
string
3
✓
-
{'Description':'Specifies an expanded string data value. The environment variable specified in the string must exist for the string to be expanded when you call GetExpandedStringValue. ','in':True}
Description
'The SetExpandedStringValue method sets the data value for a named value whose data type is REG_EXPAND_SZ. The SetExpandedStringValue method returns a uint32 which is 0 if successful or some other value if any other error occurred.'
implemented
True
static
True
SetExpandedStringValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the key that contains the named value to be set. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are setting. You can specify an existing named value (update) or a new named value (create). Specify an empty string to set the data value for the default named value. ','in':True}
sValue
string
3
✓
-
{'Description':'Specifies an array of string data values. ','in':True}
Description
'The SetMultiStringValue method sets the data value for a named value whose data type is REG_MULTI_SZ. The SetMultiStringValue method returns a uint32 which is 0 if successful or some other value if any other error occurred.'
implemented
True
static
True
SetMultiStringValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the key that contains the named value to be set. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are setting. You can specify an existing named value (update) or a new named value (create). Specify an empty string to set the data value for the default named value. ','in':True}
uValue
uint64
3
✓
-
{'Description':'Specifies a quad word data value. ','in':True}
Description
'The SetQWORDValue method sets the data value for a named value whose data type is REG_QWORD. '
implemented
True
static
True
SetQWORDValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 4 namespaces
{'Description':'Parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) '}
sSubKeyName
string
1
✓
-
{'Description':'Contains the key name to set the security descriptor on. '}
{'Description':'Contains the security descriptor to set on the key name. '}
Description
'The SetSecurityDescriptor method updates the specified key's security descriptor with the supplied __SecurityDescriptor. The method returns a uint32 which is 0 if successful or some other value if any other error occurred.'
{'Description':'Optional parameter that specifies the tree that contains the sSubKeyName path. The default value is HKEY_LOCAL_MACHINE (0x80000002). The following trees are defined in Winreg.h: HKEY_CLASSES_ROOT (0x80000000) HKEY_CURRENT_USER (0x80000001) HKEY_LOCAL_MACHINE (0x80000002) HKEY_USERS (0x80000003) HKEY_CURRENT_CONFIG (0x80000005) HKEY_DYN_DATA (0x80000006) Note that HKEY_DYN_DATA is a valid tree for Windows 95 and Windows 98 computers only. '}
sSubKeyName
string
1
✓
-
{'Description':'Specifies the key that contains the named value to be set. '}
sValueName
string
2
✓
-
{'Description':'Specifies the named value whose data value you are setting. You can specify an existing named value (update) or a new named value (create). Specify an empty string to set the data value for the default named value. ','in':True}
sValue
string
3
✓
-
{'Description':'Specifies a string data value.','in':True}
Description
'The SetStringValue method sets the data value for a named value whose data type is REG_MULTI_SZ.'
implemented
True
static
True
SetStringValue method is in 1 class (StdRegProv) of ROOT\DEFAULT and in 6 namespaces
StdRegProv Qualifiers
Name
Value
ToInstance
ToSubclass
Overridable
Amended
Local
Description
'The StdRegProv class contains methods that interact with the system registry. You can use these methods to: Verify the access permissions for a user Create, enumerate, and delete registry keys Create, enumerate, and delete named values Read, write, and delete data values '