Log in

View Full Version : How can I write a "bat" file that will run same exe file multiple times ?


John Bold
Oct 1, 2009, 08:07 PM
I'm struggling with writing my bat file recently.

It's a basic *.bat file that is going to do some stuff on the command line.
I have wrote a basic bat file that runs ***.exe file on the command line (that is going to re-flash cell phones). But I want it to run the same exe files two times. It's a kind a exe files that starts in windows' window. But I want to open multiple windows (. Like, I want to run same exe file in different windows in order to re-flash couple phones at the same time in different windows...

Basically, I wrote the name of the exe file 2 times bottom of the first one on the edit page but, it waits for first programs to be end to open second window.

If you know how do you write simple bat files to accomplish simple ms-dos commands I think, it's pretty easy for you!!

My question is what line or command should I add to my bat file to make my bat file run exe file 2 or multiple times in different windows without wait for first one's end??

Perito
Oct 2, 2009, 05:35 AM
This batch file will launch a program (Windows Calculator) repeatedly. The START command launches the program, the WAIT program waits until it's finished. The PAUSE command probably won't be necessary for what you wish to do.

If you remove the "WAIT", you'll get multiple copies of calculator running. In fact, if you let this run without the PAUSE, you'll have more copies of calculator than you can deal with.

Here's a link to information on the START command

MS-DOS start command help (http://www.computerhope.com/starthlp.htm)

:BEGIN
START/WAIT C:\WINDOWS\system32\CALC.EXE
PAUSE
Go to BEGIN

John Bold
Oct 4, 2009, 12:06 AM
Thanks a lot! This is what I was looking for...

jai2128
Feb 8, 2012, 03:41 AM
Thank You so much,how I can repeat this without pressing any key...

By jai

RogerVadey
Feb 5, 2013, 09:32 AM
Just download and install Dr.Batcher, it's a tool to create batch file (http://www.drbatcher.com). Run Simple mode, choose command 'Execute program' and type the program you want to run. Repeat any times you need. That's all!