diff --git a/doc/changelog.d/4670.fixed.md b/doc/changelog.d/4670.fixed.md new file mode 100644 index 000000000000..4e58294182a1 --- /dev/null +++ b/doc/changelog.d/4670.fixed.md @@ -0,0 +1 @@ +Pop up window for launch fluent. diff --git a/src/ansys/fluent/core/launcher/launcher_utils.py b/src/ansys/fluent/core/launcher/launcher_utils.py index 4bcf0b19921b..fca18630af05 100644 --- a/src/ansys/fluent/core/launcher/launcher_utils.py +++ b/src/ansys/fluent/core/launcher/launcher_utils.py @@ -106,9 +106,12 @@ def _get_subprocess_kwargs_for_fluent(env: Dict[str, Any], argvals) -> Dict[str, stderr=pyfluent.config.launch_fluent_stderr, ) if is_windows(): - kwargs.update(shell=True, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP) + kwargs.update( + creationflags=subprocess.CREATE_NEW_PROCESS_GROUP + | subprocess.CREATE_NO_WINDOW + ) else: - kwargs.update(shell=True, start_new_session=True) + kwargs.update(start_new_session=True) fluent_env = os.environ.copy() fluent_env.update({k: str(v) for k, v in env.items()}) fluent_env["REMOTING_THROW_LAST_TUI_ERROR"] = "1" diff --git a/src/ansys/fluent/core/launcher/standalone_launcher.py b/src/ansys/fluent/core/launcher/standalone_launcher.py index e30128bfd320..fc06ae0da792 100644 --- a/src/ansys/fluent/core/launcher/standalone_launcher.py +++ b/src/ansys/fluent/core/launcher/standalone_launcher.py @@ -236,14 +236,7 @@ def __init__( ) if is_windows(): - if ( - pyfluent.config.launch_fluent_stdout - or pyfluent.config.launch_fluent_stderr - ): - self._launch_cmd = self._launch_string - else: - # Using 'start.exe' is better; otherwise Fluent is more susceptible to bad termination attempts. - self._launch_cmd = 'start "" ' + self._launch_string + self._launch_cmd = self._launch_string else: if self.argvals["ui_mode"] not in [UIMode.GUI, UIMode.HIDDEN_GUI]: # Using nohup to hide Fluent output from the current terminal @@ -257,7 +250,6 @@ def __call__(self): return self._launch_string, self._server_info_file_name try: logger.debug(f"Launching Fluent with command: {self._launch_cmd}") - process = subprocess.Popen(self._launch_cmd, **self._kwargs) try: