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?

link|improve this question

38% accept rate
feedback

1 Answer

up vote 3 down vote accepted

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 /?

link|improve this answer
That worked just great... thanks. – mikedopp Nov 14 '11 at 20:53
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.