Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have proposed in StackOverflow question a way to <a href="https://stackoverflow.com/questions/298562">run a batch file in the background (<strong>no DOS windows displayed</strong>)</a></p> <p>That should answer your question.</p> <p>Here it is:</p> <hr> <p>From your first script, call your second script with the following line:</p> <pre><code>wscript.exe invis.vbs run.bat %* </code></pre> <p>Actually, you are calling a vbs script with:</p> <ul> <li>the [path]\name of your script</li> <li>all the other arguments needed by your script (<code>%*</code>)</li> </ul> <p>Then, invis.vbs will call your script with the <a href="http://msdn.microsoft.com/en-us/library/d5fk67ky(VS.85).aspx" rel="noreferrer">Windows Script Host Run() method</a>, which takes:</p> <ul> <li>intWindowStyle : 0 means "invisible windows"</li> <li>bWaitOnReturn : false means your first script does not need to wait for your second script to finish</li> </ul> <p>See the question for the full invis.vbs script:</p> <pre><code>Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run """" &amp; WScript.Arguments(0) &amp; """" &amp; sargs, 0, False ^ means "invisible window" ---| </code></pre> <hr> <p>Update after Tammen's feedback:</p> <p>If you are in a DOS session and you want to launch another script "in the background", a simple <code>/b</code> (as detailed in the <a href="https://stackoverflow.com/questions/298562">same aforementioned question</a>) can be enough:</p> <blockquote> <p>You can use <strong><code>start /b second.bat</code></strong> to launch a second batch file asynchronously from your first that shares your first one's window.</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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