def _autodetect_official_installreg(self):
try:
key = winreg.OpenKey(
winreg.HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\PUTTY_is1",
access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY)
value = winreg.QueryValueEx(key, "InstallLocation")[0]
winreg.CloseKey(key)
exe_file = os.path.join(value, self.EXE_NAME_OFFICIAL)
if os.path.exists(exe_file):
return exe_file
except:
pass
return None
评论列表
文章目录