winreg
(Windows Registry API) provides functions to expose the Windows Registry API to Python. We use this module to expose a low-level interface to the registry.
The method DeleteValue
removes a value associated with a registry key.
_winreg.DeleteValue(key, value)
key
: Any open HKEY_*
constant or one of the predefined HKEY_*
constants can be given as a parameter to the method.
value
: The value a user wants to remove.
This method has no return value.
Here is a coding example demonstrating the use of the DeleteValue
method to delete a specific name from the registry. It uses self.hkey
and any specific value value1
to be removed from directory.
def deleteValueinRegistry(self):
_winreg.DeleteValue(self.hkey,"value1")
Free Resources