Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Two years old, but for completeness...</p> <p><strong>Standard, inline approach:</strong> (i.e. behaviour you'd get when using <code>&amp;</code> in Linux)</p> <pre><code>START /B CMD /C CALL "foo.bat" [args [...]] </code></pre> <p>Notes: 1. <code>CALL</code> is paired with the .bat file because that where it usually goes.. (i.e. This is just an extension to the <code>CMD /C CALL "foo.bat"</code> form to make it asynchronous. Usually, it's required to correctly get exit codes, but that's a non-issue here.); 2. Double quotes around the .bat file is only needed if the name contains spaces. (The name could be a path in which case there's more likelihood of that.). </p> <p><strong>If you don't want the output:</strong></p> <pre><code>START /B CMD /C CALL "foo.bat" [args [...]] &gt;NUL 2&gt;&amp;1 </code></pre> <p><strong>If you want the bat to be run on an independent console:</strong> (i.e. another window)</p> <pre><code>START CMD /C CALL "foo.bat" [args [...]] </code></pre> <p><strong>If you want the other window to hang around afterwards:</strong></p> <pre><code>START CMD /K CALL "foo.bat" [args [...]] </code></pre> <p>Note: This is actually poor form unless you have users that specifically want to use the opened window as a normal console. If you just want the window to stick around in order to see the output, it's better off putting a <code>PAUSE</code> at the end of the bat file. Or even yet, add <code>^&amp; PAUSE</code> after the command line:</p> <pre><code>START CMD /C CALL "foo.bat" [args [...]] ^&amp; PAUSE </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload