From e10f774e9d7f666ca15cd4b9087f8cd51f2abc34 Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Thu, 15 Apr 2021 15:57:37 +0300 Subject: [PATCH] Upgrade OSCMD in Orchestrator - it will create new console window for cmd commands --- Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index ae8dae32..87c98958 100644 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -4,6 +4,7 @@ from . import Timer from . import Processor from . import BackwardCompatibility # Backward compatibility from v1.1.13 from . import Core +from subprocess import CREATE_NEW_CONSOLE from .Utils import LoggerHandlerDumpLogList # ATTENTION! HERE IS NO Relative import because it will be imported dynamically @@ -210,7 +211,7 @@ def OSCMD(inCMDStr, inRunAsyncBool=True, inLogger = None): def _CMDRunAndListenLogs(inCMDStr, inLogger): lResultStr = "" lOSCMDKeyStr = str(uuid.uuid4())[0:4].upper() - lCMDProcess = subprocess.Popen(f'cmd /c {inCMDStr}', stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + lCMDProcess = subprocess.Popen(f'cmd /c {inCMDStr}', stdout=subprocess.PIPE, stderr=subprocess.STDOUT, creationflags=CREATE_NEW_CONSOLE) if inLogger: lListenBool = True inLogger.info(f"{lOSCMDKeyStr}: # # # # CMD Process has been STARTED # # # # ")