BAT/CMD to launch a exe multiple times with different parameters without extra bat files

10,776

Sounds like you want to launch simultaneous multiple instances of happy.exe?

You can accomplish it using the START command in a single batch file:

start "one" happy.exe optimize 113 /nointerupt >NuL &
start "two" happy.exe optimize 114 /nointerupt >NuL &
start "three" happy.exe optimize 115 /nointerupt >NuL &
start "four" happy.exe optimize 116 /nointerupt >NuL &

For usage type start /?

Share:
10,776

Related videos on Youtube

mikedopp
Author by

mikedopp

Updated on September 18, 2022

Comments

  • mikedopp
    mikedopp over 1 year

    Have a bat that calls a single exe for say 5-10 functions. Is there a way to make the executable run in multiple processes from a bat or cmd? for example:

      start cmd /k 
       cd Program files\Prog\Happy
       happy.exe optimize 113 /nointerupt >NuL &
       happy.exe optimize 114 /nointerupt >NuL &
       happy.exe optimize 115 /nointerupt >NuL &
       happy.exe optimize 116 /nointerupt >NuL &
    

    I would rather not use multiple bat files called from one bat file. Perhaps create a separate PID for each exe....?

    Ideas?