int ShellExecute(array $se)
This function may pose a security risk and a risk for accidental damage such as data loss; use it carefully. Also, enable potentially destructive functions in the Config Files Options Page for it to work.
•This function is based on the Windows ShellExecute() function. It can be used to run a program.
•$se - an array
•$se.File - (required) the file or application to run (a full path is recommended otherwise the current drive and current directory is used); do not surround in quotes
•$se.Parameters - (optional) the parameters to be passed; use quotes around arguments as necessary, like for file names containing space characters
•$se.Directory - (optional) the full path to the default working directory/folder to use
•Returns an integer indicating the status
•3 - no error, but the function is disabled because potentially destructive functions are not enabled (new v11.9945)
•2 - no error, but did not do anything because this function is not supported in the lite edition
•1 - the Windows ShellExecute() function succeeded
•0 - the Windows ShellExecute() function failed (the return value is placed in $se.returncode)
•-1 - $se doesn't exist or isn't an array
•-2 - the Windows ShellExecute() function caused an exception
•-3 - array $se does not contain the required data
•This function is supported only in CSE HTML Validator v11.9914 and later, and is not supported in the lite edition.
$se.File='C:\Windows\System32\calc.exe';
ShellExecute($se);
function onBeforeReportOpen() {
$se.File='C:\Windows\System32\notepad.exe';
// notice the quotes added around the arguments
$se.Parameters='"'+$_JOB.report.filename+'"';
ShellExecute($se); // opens Windows Notepad with the report file
}