From 57da8c3ad041355994012dd87f55e50da4f62242 Mon Sep 17 00:00:00 2001 From: jonpas Date: Tue, 12 Dec 2017 12:40:33 +0100 Subject: [PATCH] Fix Mikero tools detection not looking at Wow6432Node --- tools/make.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/make.py b/tools/make.py index f56c72fb8d..f0e36d8d6a 100644 --- a/tools/make.py +++ b/tools/make.py @@ -239,8 +239,16 @@ def find_depbo_tools(): k = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Mikero\{}".format(tool)) path = winreg.QueryValueEx(k, "exe")[0] except FileNotFoundError: - k = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Mikero\{}".format(tool)) - path = winreg.QueryValueEx(k, "exe")[0] + try: + k = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Mikero\{}".format(tool)) + path = winreg.QueryValueEx(k, "exe")[0] + except FileNotFoundError: + try: + k = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Wow6432Node\Mikero\{}".format(tool)) + path = winreg.QueryValueEx(k, "exe")[0] + except FileNotFoundError: + k = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Wow6432Node\Mikero\{}".format(tool)) + path = winreg.QueryValueEx(k, "exe")[0] except FileNotFoundError: print_error("Could not find {}".format(tool)) failed = True