I am running the below code in the testcomplete . It opens a command line and executes the command mentioned in the command line. However after the execution of the command , the control is not returned back to the testcomplete. what seems to be the issue here?
WshShell.Run("cmd /K cd C:\Users\Tester\ & echo testing",1,true); Log.Message("completed");
The 'issue' seems to be the '/K' in your command line: This means, cmd keeps open after running the commands. (I.e. WshShell is waiting for cmd to complete for ever.) Try '/C' instead: this means, cmd run the commands and ends after that. I.e:
You get more input on the /C and /K options calling following command from the prompt:
(Do WindowsKey+R, type cmd.exe and then enter to get the prompt.)
I hope this help.