How to execute a .exe file in CEP Premiere Pro
I built a scriptin Node.js and packaged it and now I have a .exe file that works file, now I want a way to execute it in the the CEP panel via code.
I tried the
//enabled the QE DOM
system.callSystem(cmd)But QE was not supported in the PPRO v25 ig.
Then I tried to run the script via the child_process but it also did not work (I did not get the result printed into my HTML nor any error was seen)
childProcess.execFile(exeFullPath, args, function (error, stdout, stderr) {
var logMsg = "";
if (error) {
logMsg += "ERROR executing command: " + error + "\n";
logMsg += "STDERR: " + stderr + "\n";
updateResult(logMsg);
callback("ERROR: " + error);
} else {
logMsg += "Command executed successfully.\n";
logMsg += "STDOUT: " + stdout + "\n";
logMsg += "STDERR: " + stderr + "\n";
updateResult(logMsg + "Reading output file...");
// Read the output file using CEP FS.
var resultFile = cepFs.readFile(outFileName);
if (resultFile.err === 0) {
callback(resultFile.data);
} else {
callback("ERROR reading output file: " + resultFile.err);
}
}
});
