Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Windows 7, and have a simple batch file to copy portable executables off my thumb drive to %TEMP%, and then start them. The goal is to prevent Windows from holding my thumbdrive hostage until I kill all the programs I started up from it.

However the control flow does not continue to the next app unless I kill the first one, which obviously doesn't work for this purpose.

In a Unix shell script I'd simply add & after the executable I start up, but I can't find an equivalent for batch files.

How can I do this?

share|improve this question
up vote 6 down vote accepted

You can use the start command.

Like so: start someprogram.exe

It will start the program then give control back to the main batch file, running the second program in the background.

share|improve this answer
Excellent: thanks. I'm sure that was a painfully dumb question to anyone who regularly works with batch files. – iconoclast Aug 23 '12 at 22:33
If the path for the executable contains spaces, you need to use start "" "foo\my program.exe". Type start /? for details. – paradroid Aug 23 '12 at 22:33
Not dumb at all, it's a good question. You can also run batch files from other batch files using the call command. On there's a question with a list of cool tricks you can do on the Windows command line, it's great! – Mark Allen Aug 23 '12 at 23:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .