CAPL Script

SysExecSysExecCmd

Note In case of a distributed simulation environment using aVN8900device, a real-time module (VT 6000family) or aCANoe RTserver,sysExecexecutes the requested command as follows:

Syntax

long sysExec(char cmd[], char params[]);

long sysExec(char cmd[], char params[], char directory[]); // form 2

long sysExecCmd(char cmd[], char params[]);

long sysExecCmd(char cmd[], char params[], char directory[]); // form 2

Function

Executes an external command. Does not wait until the command has completed its execution. sysExecmust be given an executable;sysExecCmdcallscmd.EXE /Kwith the first parameter, which opens a command window where the command is executed as if it was entered directly.

Parameters

cmd The command to be executed. Either the full absolute path or a path relative to the current working directory must be given or the command must be in the system path.

params

Parameters to the command. A parameter which contains spaces must be enclosed in " ".

directory(Form 2) Working directory for the command. Either an absolute path or a path relative to the current working directory must be given.

Return Values

1 if the command was successfully started, else 0.

1 If the working directory ofCANoeis not the same as the directory of a called program, the path for this program must be given in the function. sysExec("C:\\Program Files\\Beyond Compare 3\\BCompare.EXE", Commandline, "C:\\Program Files\\Beyond Compare 3");


2 char configDir[1024];getAbsFilePath("", configDir, elcount(configDir));sysExecCmd("dir", "/O:-D", configDir); // show files in configuration directory, newest files first

getAbsFilePath
| TestWaitForSyscall