Absent Member.
Absent Member.
1136 views

No script engine

I am trying to execute a "ProcessExecuter Test". I am trying to run a simple batch file that writes some text to a file. My executable name is cmd.exe, the argument list is: /c cscript echo.bat %SCTM_EXEC_RESULTSFOLDER% and the working folder is a path to my batch file. The error message I am getting is "Process exited with return code 1". Did I set up my properties wrong? 

0 Likes
1 Reply
Absent Member.
Absent Member.

Hi vb22,

On the Test Properties your Argument List, just needs to be: /c "c:\temp\echo.bat"

I have also made a sample echo.bat file which does the move in it below, create the batch file using the script below, once this works you can modify your own values.

----------------------------------------------------------------------

@echo off

@echo "SilkCentral">output.txt

@echo "TestBatch">>output.txt

@echo Number1>> output.txt

@echo Run1>> output.txt

set source="C:\temp\output.txt"

xcopy %source% %SCTM_EXEC_RESULTSFOLDER% /y

---------------------------------------------------------------------------------

What this will do is set the source, and copy it to the working folder as the script is running, the text document is created where the test is executed, so this will be the temp folder.

You will then set your working directory as c:\temp, and just make sure the batch file is in this directory on your execution server.

Let me know if you have any further questions or issues let me know.

Thanks,

Matthew

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.