From 490b57724077f3178869da79586ca0e2c8b4c54a Mon Sep 17 00:00:00 2001 From: hawkeye116477 Date: Sat, 30 May 2026 12:54:05 +0200 Subject: [PATCH] Display UAC prompt for games which requires admin rights (#668) * Display UAC prompt for games which requires admin rights * Execute through the shell only at Windows --- legendary/cli.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/legendary/cli.py b/legendary/cli.py index 730197c..b3006d0 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -717,7 +717,10 @@ class LegendaryCLI: if params.environment: logger.debug('Environment overrides: {}'.format(', '.join( f'{k}={v}' for k, v in params.environment.items()))) - subprocess.Popen(full_params, cwd=params.working_directory, env=full_env) + use_shell = False + if os.name == 'nt': + use_shell = True + subprocess.Popen(full_params, cwd=params.working_directory, env=full_env, shell=use_shell) def _launch_third_party(self, args): game = self.core.get_game(app_name=args.app_name)