2.6. Registry
The Registry
instance is accessible via windows.system.registry
2.6.1. Registry
-
class windows.winobject.registry.Registry(sam=KEY_READ(0x20019))[source]
The Windows
registry
-
__call__(name, sam=None)[source]
Get a registry key:
registry(r"HKEY_LOCAL_MACHINE\Software")
registry("HKEY_LOCAL_MACHINE")("Software")
- Return type:
PyHKey
-
classmethod reopen(sam)[source]
Return a new Registry
using sam
as the new default
- Return type:
Registry
2.6.2. PyHKey
-
class windows.winobject.registry.PyHKey(surkey, name, sam=KEY_READ(0x20019))[source]
A windows registry key
-
__call__(name)
Alias for open_subkey()
-
__getitem__(name)
Alias for get()
-
__setitem__(name)[source]
Wrapper for set()
, accept value
or (value, type)
-
__delitem__(name)
Alias for delete_value()
-
create()[source]
Create the registry key
-
delete()[source]
Delete the registry key
-
delete_value(name)[source]
Delete the value with name
-
get(value_name)[source]
Retrieves the value value_name
- Return type:
KeyValue
-
open_subkey(name, sam=None)[source]
Open the subkey name
- Return type:
PyHKey
-
reopen(sam)[source]
Reopen the registry key with a new sam
- Return type:
PyHKey
-
set(name, value, type=None)[source]
Set the value for name
to value
. if type
is None try to guess items
-
property subkeys
The subkeys of the registry key
- Type:
[PyHKey
] - A list of keys
-
update_security_descriptor(owner=<object object>, dacl=<object object>, sacl=<object object>, group=<object object>)[source]
[WIP] Api for simple SD update may change
-
property values
The values of the registry key
- Type:
[KeyValue
] - A list of values
2.6.3. KeyValue
-
class windows.winobject.registry.KeyValue(name, value, type)
A registry value (name, value, type)
-
name
Alias for field number 0
-
type
Alias for field number 2
-
value
Alias for field number 1