View Code? Open in Web Editor
NEW
Create | Read | Update | Delete |> Windows Registry for Python >3
Python 99.15%
Batchfile 0.85%
winregistrycrud's Introduction
- Developed by:
SebastianEPH
- Product name:
WinRegistry CRUD
- Type software:
Library
- File version:
1.0
- State:
Finish
- Plataform:
Only Windows 7, 8.1, 10
- Programming language:
Python 3.9
- Licence:
MIT
- IDE or text editor:
PyCharm
- Documentation date:
08-12-2020
- Description:
Biblioteca que permite, leer, crear, eliminar llaves y valores del registro de Windows
Create Key
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\Adobe'
nameKey = 'config'
k = WinRegistry(path)
k.create_key(nameKey)
Delete Key
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\Adobe'
nameKey = 'config'
k = WinRegistry(path)
k.delete_key(nameKey)
Set value String
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\test'
nameValue = 'config'
value = "soy un valor String"
k = WinRegistry(path)
k.set_value_String(nameValue, value)
Set value Binary
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\test'
nameValue = 'Typebinary'
value = b'v\x00l\x00c\x00.\x00e\x00x\x00e\x00\x00\x00\x00'
k = WinRegistry(path)
k.set_value_Binary(nameValue, value)
Set value DWORD
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\test'
nameValue = 'TypeDWORD'
value = 45
k = WinRegistry(path)
k.set_value_DWORD(nameValue, value)
Set value QWORD
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\test'
nameValue = 'TypeQWORD'
value = 45545454545
k = WinRegistry(path)
k.set_value_QWORD(nameValue, value)
Set value Multi-String
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\test'
nameValue = 'TypeMultiString'
value = ['linea 1', 'linea 2', 'linea fin']
k = WinRegistry(path)
k.set_value_MultiString(nameValue, value)
Set value Expandable-String
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\test'
nameValue = 'TypeExpandableString'
value = "texto largo..."
k = WinRegistry(path)
k.set_value_ExpandableString(nameValue, value)
Delete Value
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\test'
nameValue = "name"
k = WinRegistry(path)
k.delete_value(nameValue)
Read Value
path = r'Computer\HKEY_CURRENT_USER\SOFTWARE\test'
nameValue = "name"
k = WinRegistry(path)
print(k.read_value(nameValue))
Versión de esta lib pero en en C# .net
winregistrycrud's People
Contributors
Watchers