Forum Discussion

Gunacelan's avatar
Gunacelan
Contributor
2 years ago

Testcomplete command line execution

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");

 

 

 

 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Note the parameter /K Carries out the command specified by string but remains. Whereas /C Carries out the command specified by string and then terminates