MCPcopy
hub / github.com/blackboxo/CleanMyWechat / read_registry_value

Function read_registry_value

utils/selectVersion.py:97–108  ·  view source on GitHub ↗
(key_path, value_name)

Source from the content-addressed store, hash-verified

95
96
97def read_registry_value(key_path, value_name):
98 if winreg is None:
99 return None
100 try:
101 key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, key_path)
102 value, _ = winreg.QueryValueEx(key, value_name)
103 winreg.CloseKey(key)
104 return value
105 except FileNotFoundError:
106 print("Registry key or value not found.")
107 except Exception as e:
108 print("Error occurred:", str(e))
109
110
111def get_dir_name(filepath):

Callers 2

find_all_wechat_pathsFunction · 0.85
getAllPathMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected