diff --git a/app/Config/OpenAudit.php b/app/Config/OpenAudit.php index 432c98229..4f6d48db8 100755 --- a/app/Config/OpenAudit.php +++ b/app/Config/OpenAudit.php @@ -22,9 +22,15 @@ public function __construct() '/usr/local/opmojo', 'c:\\omk'); - $binaries = array(APPPATH . '../other/enterprise.bin', - APPPATH . '../other/enterprise.exe', - '/usr/local/oac/enterprise.pl'); + if (php_uname('s') === 'Windows NT') { + $commercial_dir = array('c:\\omk'); + } + + $binaries = array(APPPATH . '../other/enterprise.bin', '/usr/local/oac/enterprise.pl'); + + if (php_uname('s') === 'Windows NT') { + $binaries = array(APPPATH . '../other/enterprise.exe'); + } $nmis = "/usr/local/nmis9"; diff --git a/app/Helpers/response_helper.php b/app/Helpers/response_helper.php index b6e6d67fc..596548a04 100644 --- a/app/Helpers/response_helper.php +++ b/app/Helpers/response_helper.php @@ -460,11 +460,9 @@ function response_create($instance = null) // Call the binary and wait for it's response unset($output); if (php_uname('s') === 'Windows NT') { - #$command = "%comspec% /c start /b " . $config->enterprise_binary . " $id"; - $command = "%comspec% /c start /b enterprise.exe $id"; + $command = "%comspec% /c start /b " . $config->enterprise_binary . " $id"; if (!empty($_SERVER['CI_ENVIRONMENT']) and $_SERVER['CI_ENVIRONMENT'] === 'development') { - #$command = "%comspec% /c start /b " . $config->enterprise_binary . " --debug $id"; - $command = "%comspec% /c start /b enterprise.exe --debug $id"; + $command = "%comspec% /c start /b " . $config->enterprise_binary . " --debug $id"; log_message('debug', $command); } $cwd = getcwd();