Forum Discussion

pvidal's avatar
pvidal
Contributor
15 years ago

How to call an external program with different argument every time?

Hello,



I am using JScrip for our tests cases.



I need to call an external program with different arguments every time. I added the program to the TestedApps and I set the Params.SimpleParams.CommandLineParameters property with the arguments and then call the Run() method of the application. The problem with this approach is that when I set the Params.SimpleParams.CommandLineParameters property it changes the project file that it is in source control and TestComplete needs to check it out every time to be able to run the tests. 



Is there another/correct way to do this?



Thank you,

Patricio.

2 Replies

  • Hello Jared,



    Thank you for your answer. It was very simple after all:




        var shell = new ActiveXObject("WScript.Shell");

        var errorCode = shell.Run(command, 1, true);


    Thank you,

    Patricio.