views:

346

answers:

2

I've got a pretty stubborn executable that I would like to execute sequentially multiple times from within a Dos batch file. (Due to IT constrains currently constrained to using Dos batch files.)

I am able to use START to launch the executable, however, it seems the executable is expecting the user to hit return prior to "really" running/executing.

In a DOS Batch script is there anyway work with an executable that is expecting the user to hit return prior to running? I would like for the "return" to be in the script and not have to actually click on the window and manually hit return.

Thank you for any feedback provided.

P.S. Figured out that /wait option in START so that the next execution will start right up once the first one is finished and so on, but having trouble figuring out how to input a "return".

+1  A: 

You can pipe the input from other file, for example,

Write a text file with one carriage return and call it like..

start "YourExe.exe < text.txt",

Akash Kava
A: 

You can use

echo.|DoStuff.exe

provided your executable is a console program.

Joey
Ended up going with this approach since it did not require the use of a secondary file, and it worked very well. Thanks a ton!
JustADude