RDP.SystemCMDRun - Add auto exit from cmd when executed

dev-linux
Ivan Maslov 4 years ago
parent 8c4ca98fc2
commit cdef4baea8

@ -375,7 +375,7 @@ def SystemCMDRun(inSessionHexStr, inCMDCommandStr = "echo 1", inModeStr="CROSSCH
#keyboard.write("cmd") # Open cmd #keyboard.write("cmd") # Open cmd
#time.sleep(1) #time.sleep(1)
#keyboard.press_and_release('enter') # Execute CMD #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) time.sleep(1)
keyboard.press_and_release('enter') # Execute command keyboard.press_and_release('enter') # Execute command
if inModeStr == "CROSSCHECK" or inModeStr == "LISTEN": # Get OutStr (Case CROSSCHECK and LISTEN) if inModeStr == "CROSSCHECK" or inModeStr == "LISTEN": # Get OutStr (Case CROSSCHECK and LISTEN)

Loading…
Cancel
Save