# Call to external programs with parameters

Many PHP applications call to external utility programs with parameters. The PHP function exec() doesn’t work in very most cases in ExeOutput. There is the HEScript command RunAProgram to replace exec():

For example:

procedure procExecProgram;

begin

end;

In the PHP script, this procedure has to be called by (if in the pre-installed UserMain HEScript):

exo_runhescriptcom(“UserMain.procExecProgram”);

My observations:

1. Many PHP scripts call programs with parameters. They should be defined in the second field, such as:

1. White spaces and backslashes in the path are no problem. Example for a macro call:

RunAProgram(“C:\Map Maker\MMmacro.exe”,“C:\Temp\Temp1.bat”,"",true,"");

1. Output piping will not work as parameter (at least not for me), such as: