From cdef4baea81b07560fc02670734fd2f051a139ad Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Tue, 2 Mar 2021 18:25:48 +0300 Subject: [PATCH] RDP.SystemCMDRun - Add auto exit from cmd when executed --- Sources/pyOpenRPA/Orchestrator/RobotRDPActive/Connector.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/pyOpenRPA/Orchestrator/RobotRDPActive/Connector.py b/Sources/pyOpenRPA/Orchestrator/RobotRDPActive/Connector.py index b2d7c0e4..b7f62d41 100644 --- a/Sources/pyOpenRPA/Orchestrator/RobotRDPActive/Connector.py +++ b/Sources/pyOpenRPA/Orchestrator/RobotRDPActive/Connector.py @@ -375,7 +375,7 @@ def SystemCMDRun(inSessionHexStr, inCMDCommandStr = "echo 1", inModeStr="CROSSCH #keyboard.write("cmd") # Open cmd #time.sleep(1) #keyboard.press_and_release('enter') # Execute CMD - keyboard.write(f"({inCMDCommandStr}) {lCMDPostFixStr}", delay=0.05) # send command + keyboard.write(f"(({inCMDCommandStr}) {lCMDPostFixStr}) && exit", delay=0.05) # send command time.sleep(1) keyboard.press_and_release('enter') # Execute command if inModeStr == "CROSSCHECK" or inModeStr == "LISTEN": # Get OutStr (Case CROSSCHECK and LISTEN)