RDP.SystemCMDRun - 3 fix if command string is more than 259 symb - not applicable for RUN window - need to open CMD and type!

dev-linux
Ivan Maslov 4 years ago
parent 137ec89fc2
commit 796b0b1224

@ -307,11 +307,11 @@ def SystemCMDRun(inSessionHexStr, inCMDCommandStr = "echo 1", inModeStr="CROSSCH
lCrosscheckKeyStr = str(random.randrange(999,9999999))
lRecoveryCMDResponsibleRetryIteratorInt = 0 # Init the retry iterator
lCommandIsTooBigBool = False
lCMDPostFixStr = "" # Case default "RUN"
while lRecoveryCMDResponsibleRetryIteratorInt<gRecoveryCMDResponsibleRetryCountInt: # loop for retry
# # # # # # # # # # # # # OPEN WINDOW RUN # # # # # # # # # # # # # # #
lRecoveryWindowRUNRetryIteratorInt = 0 # Init the retry iterator
while lRecoveryWindowRUNRetryIteratorInt<gRecoveryWindowRUNRetryCountInt: # loop for retry
lCMDPostFixStr = "" # Case default "RUN"
if inModeStr == "CROSSCHECK":
#lCMDPostFixStr = f"& (echo {lCrosscheckKeyStr} | clip)"
lCMDPostFixStr = f"| (echo {lCrosscheckKeyStr} | clip)" # Bugfix async set clipboard data
@ -330,9 +330,10 @@ def SystemCMDRun(inSessionHexStr, inCMDCommandStr = "echo 1", inModeStr="CROSSCH
keyboard.write(lInputStr) # Write new text
else:
if lL: lL.warning(
f"RDP.SystemCMDRun: ATTENTION! Your command is too big for the RUN window (len is {len(lInputStr)}. Orchestrator will send this command to the new cmd window. ")
f"RDP.SystemCMDRun: ATTENTION! Your command is too big for the RUN window (len is {len(lInputStr)}). Orchestrator will send this command to the new cmd window. ")
lInputStr = "cmd"
lCommandIsTooBigBool = True
keyboard.write("cmd") # Write new text
keyboard.write(lInputStr) # Write cmd
time.sleep(gKeyboardHotkeyDelaySecFloat)
# Check if autocomplete
# # # # # # #

Loading…
Cancel
Save