Hey,
Have a bash file that will execute on command. That way when you call the bash file it will open a dummy terminal and run the command, then quit the terminal. Here is a windows version of how to use the EXEC function to your advantage. This was originally developed by a friend of mine.
What this does is create a COM object that will be a terminal in Windows that is silent or not seen. Then what it will do is run the commands listed. Also taking the arguments that are passed to it by $arguments and making them be seperated by spaces.
<?php
function RunEXE ($exe_name, $arguments)
{
$unixtime = time();
$cmd = "C:\\www\\odnr_enterprise_suite\\csrfinal\\exe\\" . $exe_name . ".exe";
$arg = explode("^^",$arguments);
$outputfile = "C:\\www\\odnr_enterprise_suite\\csrfinal\\" . $unixtime . ".txt";
$cmdline = "cmd /C $cmd " . implode(' ', $arg) . " > $outputfile";
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmdline, 0, true);
$output = file($outputfile);
unlink($outputfile);
foreach($output as $temp_output)
{
if($temp_output == 1)
{
return 1;
}else{
return $temp_output;
}
}
}
?>
Hope this helps ya out.
Chad R. Smith