Ask a Question

Execute scripts by command line is not working for TestExecute 15

Occasional Contributor

Execute scripts by command line is not working for TestExecute 15



Can someone help me with the following issue? Previously I created a bat file to execute some scripts with TestExecute, this worked for a year but then stopped working when I update TestComplete and TestExecute to the 15 version, when I execute the same bat file I am getting the following error message:


"Windows cannot find 'TestExecute.exe'. Make sure you typed the name correctly, and then try again"


I already tried to open first TestExecute with the following command line "START /I TestExecute.exe" but I am just getting the following message "The system cannot find the file TestExecute.exe". For now I am doing the following workaround:


1) Open manually (double click) TestExecute

2) Exit the software from the toolbar so it gets closed

3) Running again the same bat file with this command line:

                 "start /wait "TestExecute" TestExecute.exe "C:\Users\user\Testing.pjs" /r /p:Testing /t:"KeywordTests|Test" /run /exit /SilentMode

4) Following the previous steps the bat file works and all the scripts are executed, even if I execute the same bat file multiple times, the issue is just the first time that I want to execute the scripts because it doesn't find TestExecute


Could you please help me with this issue? for now I am fine with the workaround but eventually we will execute the scripts using TaskScheduler  and the bat file, thank you and please let me know any comment or question.

Champion Level 3

Let's see your .bat file please.

Occasional Contributor

Sure, please find attached the bat file


Sounds like you need to add the path to TestExecute to your PATH environmental variable.

Occasional Contributor

Ok, unfortunately I don't have permissions to do it, let me ask the support team to add it to the PATH environment variable and see if this fix the issue, thank you for your response, I will get back with the results

Occasional Contributor

After adding the path of "Test Execute 15" to the PATH environment variable I was able to execute the scripts using the bat file, thank you for all your help


Note: For the people that has the same issue, I added the following path "C:\Program Files (x86)\SmartBear\TestExecute 15\Bin" into the PATH environment variable

Frequent Contributor

Hello, I wonder, What is the 'PATH environment variable' ?? 

Occasional Contributor

Hello, it is the environment variable that is called "PATH" you can find it following these steps:


1) Open Windows browser and type "Edit environment variables for your account" and select this option

2) In the "Environment variables" screen there should be a variable with the name "Path"

3) Select this variable and click on "Edit" button, the "Edit environment variable" screen should be opened

4) Click on "New" button and then enter the path of the folder where you have the .exe for TestExecute, for me it was the following "C:\Program Files (x86)\SmartBear\TestExecute 15\Bin"

5) Click on "OK" and then "OK" button to apply the changes

6) I don't remember if I needed to restart the machine to see the changes reflected, but in case you don't see them immediately you may need to restart it


Note: If you are working in a company, you may not have the proper permissions to update the environment variables, if that is the case you will need to contact your IT support team to do it, hope this helps

Showing results for 
Search instead for 
Did you mean: