diff --git a/scripts/install_deps.py b/scripts/install_deps.py index 6586ac71a04..8fc529b68f0 100755 --- a/scripts/install_deps.py +++ b/scripts/install_deps.py @@ -248,7 +248,7 @@ def windows(self): sys.exit(0) else: windows.run_elevated( - __file__, "--only-elevated --skip-python", wait_for_exit=True + __file__, "--only-elevated --skip-python" ) qt = qt_utils.WindowsQt(*self.config.get_qt_config()) diff --git a/scripts/lib/windows.py b/scripts/lib/windows.py index ffd1cff352a..64845371a5b 100644 --- a/scripts/lib/windows.py +++ b/scripts/lib/windows.py @@ -19,7 +19,6 @@ import lib.env as env from lib.certificate import Certificate -LOCK_FILE = "tmp/elevated.lock" MSBUILD_CMD = "msbuild" SIGNTOOL_CMD = "signtool" CERTUTIL_CMD = "certutil" @@ -30,14 +29,10 @@ MSI_FILE = f"{BUILD_DIR}/installer/bin/Release/Synergy.msi" -def run_elevated(script, args=None, use_sys_argv=True, wait_for_exit=False): +def run_elevated(script, args=None, use_sys_argv=True): if not args and use_sys_argv: args = " ".join(sys.argv[1:]) - if wait_for_exit: - args += f" --lock-file {LOCK_FILE}" - env.persist_lock_file(LOCK_FILE) - command = f"{script} {args} --pause-on-exit" print(f"Running script with elevated privileges: {command}") @@ -63,16 +58,6 @@ def run_elevated(script, args=None, use_sys_argv=True, wait_for_exit=False): print("Script is running with elevated privileges") - if wait_for_exit: - with open(LOCK_FILE, "r") as f: - pid = f.read() - - print(f"Waiting for elevated process to exit: {pid}") - while os.path.exists(LOCK_FILE): - # Intentionally wait forever, since this code should not run where a developer - # has no control, such as in a CI environment. - pass - def is_admin(): """Returns True if the current process has admin privileges."""