winregistry1.1.1
winregistry1.1.1
Published
Library aimed at working with Windows registry
pip install winregistry
Package Downloads
Authors
Project URLs
Requires Python
>=3.7,<4.0
Dependencies
winregistry
Minimalist Python library aimed at working with Windows Registry.
Installation
pip install winregistry
Usage
from winregistry import WinRegistry
TEST_REG_PATH = r"HKLM\SOFTWARE\_REMOVE_ME_"
if __name__ == "__main__":
with WinRegistry() as client:
client.create_key(TEST_REG_PATH)
client.write_entry(TEST_REG_PATH, "remove_me", "test")
test_entry = client.read_entry(TEST_REG_PATH, "remove_me")
assert test_entry.value == "test"
client.delete_entry(TEST_REG_PATH, "remove_me")
Usage with Robot Testing Framework
Library
*** Settings ***
Library winregistry.robot
*** Test Cases ***
Valid Login
${path} = Set Variable HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run
Write Registry Entry ${path} Notepad notepad.exe
${autorun} = Read Registry Key ${path}
Delete Registry Entry ${path} Notepad