Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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