How do I invoke an EXE from a batch file without having the latter waiting for the EXE to finish? Something like the Cygwin 'cygstart'?
Asked
Active
Viewed 4.0k times
3 Answers
38
-
24Careful, though, if your command contains spaces. In that case you have to use `start "" "command with spaces.exe"` – Joey Oct 30 '09 at 06:46
-
I see "When executing an application that is a 32-bit GUI application, CMD.EXE does not wait for the application to terminate before returning to the command prompt. **This new behavior does NOT occur if executing within a command script.**" in the output of "start /? on Windows 7" But how make this behaviour if I need?.. – Nashev May 18 '18 at 11:33
7
put START /B before the command you want to run

Andrew Keith
- 7,515
- 1
- 25
- 41
-
That's the right and better way for me instead of START without /B. The reasons are: * The process act directly to my current cmd, thats important e.g. if want modify somewhat with powershell; * Less system resources are needed because no additional process is opened. – gotwo Apr 13 '20 at 06:45
4
Just start foo.exe
? You need to add /WAIT
to make it pause.

Marc Gravell
- 1,026,079
- 266
- 2,566
- 2,900