def _getHiveAndKey(self, fullKey):
'''Split a windows registry key in two parts: the hive (hkey) and the registry key
Eg: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion" will return: (_winreg.HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion")
'''
str_hkey, str_key = fullKey.split('\\', 1)
hiveType = WinRegHiveType.getByName(str_hkey.lower())
return hiveType.hive, str_key
评论列表
文章目录