Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shpaker authored Nov 22, 2024
1 parent 0e369d1 commit bebadf6
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,13 @@ with open_key(
) as key:
...

# create or open sub-key
with open_key(
winreg.HKEY_LOCAL_MACHINE,
sub_key="SOFTWARE",
) as key:
with key.create_key("_REMOVE_ME_"):
...

# delete key
with open_key(
winreg.HKEY_LOCAL_MACHINE,
sub_key="SOFTWARE",
) as key:
key.delete_key("_REMOVE_ME_")

# set value to subkey
with open_key(
winreg.HKEY_LOCAL_MACHINE,
sub_key="SOFTWARE\_REMOVE_ME_",
) as key:
key.set_value(
name="remove_me",
type=winreg.REG_SZ,
value="Remove me!",
)

# create value
with open_key(
"HKLM\SOFTWARE\_REMOVE_ME_",
Expand Down

0 comments on commit bebadf6

Please sign in to comment.