Ready to use, copy and paste "solution" here o):
resource.dopus.com/viewtopic.php ... ct#p140164
Make use of "RunHiddenAdvanced()", then access returncode, stdout + stderr textual output from a result object.
Takes care for proper tempfile naming and removing as well. Consider removing usage of Log() function to reduce NOLs.
var result = RunHiddenAdvanced( "my.exe", "-param1 /option2");
Log("result.code : " + result.returncode);
Log("result.stdout: " + result.stdout);
Log("result.stderr: " + result.stderr);