I have a case where I need to spawn multiple CMD
instances (using the START
program), and each instance needs to run some commands in sequence. These commands are generated by a batch script, so they are not known ahead of time.
Basically, what I'm looking to do is something like the following, but I don't know the proper syntax (or if it's even possible):
START (program_a && program_b && program_c)
Obviously, those parentheses are incorrect syntax. So when I try to run some syntactically correct variant(s):
START program_a && program_b && program_c
I just end up with one CMD
instance being spawned, running program_a
, and the "owning" batch script continues to execute program_b
and program_c
on its own (i.e. not in the CMD
instance spawned by START
).
I think, you need something like:
start "MyWindow" cmd /c "ping localhost & ipconfig & pause"