Forum Discussion

Gunacelan's avatar
Gunacelan
Contributor
12 months 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");

 

 

 

 

1 Reply

  • 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