I wonder if I can execute some programs for different cmd’s using .bat file. Look at this example .bat file:
start cmd //number one
start cmd //number two
ping localhost //call in number one
ping 192.168.1.100 //call in number two
I know that both will be executed in main window (the window where I started .bat file), but I think its easy to get the idea. This code is quite useless, but its just an example.
Thanx for all replies.
EDIT: I know about /k switch, but any way to do this not using it?
You can start your commands with
That will start two new command line prompts, run the ping command in each one seperately and both windows and the /k switch will make them stay open afterwards.
Ah, posted before your edit … 😉 The only way to interact with a shell is giving it a command to be executed when it starts. There is no way to have interaction between shells