 <p>Windows batch files don't execute themselves IIRC. You should run them through one of the two interpreters:</p> <pre><code>print shell_exec("cmd m.bat"); </code></pre> <p>(Otherwise that's the same as using the backtick operator.)</p>