diff --git a/src/PHPVideoToolkit/ProcessBuilder.php b/src/PHPVideoToolkit/ProcessBuilder.php index c18140c..bde9a11 100644 --- a/src/PHPVideoToolkit/ProcessBuilder.php +++ b/src/PHPVideoToolkit/ProcessBuilder.php @@ -148,11 +148,20 @@ protected function _combineArgumentList($commands) if(empty($commands) === false) { - foreach ($commands as $argument) - { - // the array ois a flag for a raw argument - $command_string .= (is_array($argument) === true ? $argument : escapeshellarg($argument)).' '; - } + // Is windows? + if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { + foreach ($commands as $argument) + { + $command_string .= (is_array($argument) === true ? $argument : str_replace("===NXBYPASS===", "%", escapeshellarg(str_replace("%", "===NXBYPASS===", $argument)))).' '; + } + } else { + foreach ($commands as $argument) + { + // the array ois a flag for a raw argument + + $command_string .= (is_array($argument) === true ? $argument : escapeshellarg($argument)).' '; + } + } } return trim($command_string);