简体   繁体   中英

Run Multiple .exe Files from a Batch File Simultaneously and Silently

I am on windows 10 and i need to run multiple executable files from a batch file silently, without waiting for them to finish. at the moment i have:

@echo off
start "" "%~dp0executable.exe" /q
start "" "%~dp0executable2.exe" /q

but this still opens multiple console windows.
any workarounds that achieve the same results are welcome.

Your executables seem to be console applications, otherwise no console window would appear.

Anyway, the start command features an option /B ; here is an excerpt of the output of start /? :

  B Start application without creating a new window. The application has ^C handling ignored. Unless the application enables ^C processing, ^Break is the only way to interrupt the application. 

By ^C and ^Break , pressing Ctrl + C and Ctrl + Pause/Break is meant, respectively.

In case you have a third .exe that needs to wait after the first two started simultaneously you can also use the start /w argument for the second one and call the third like so:

@echo off
start /B "%~dp0executable.exe"
start /W "%~dp0executable2.exe"
call "%~dp0executable3.exe"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM