How do you enter something at a DOS prompt Programmatically?
Posted
by LonnieBest
on Stack Overflow
See other posts from Stack Overflow
or by LonnieBest
Published on 2010-03-16T19:21:54Z
Indexed on
2010/03/16
19:31 UTC
Read the original article
Hit count: 232
dos-batch
I have program, that must interact with at DOS program before my program can continue what it is doing. I'm trying to avoid my user from having to interact with this dos program. So, I created a .bat file that does everything I need to do except for the last step which still requires user interaction that I'm trying to avoid.
Specifically, the command I type ends up at a dos prompt where I need to automatically enter y and then enter (to say yes to the prompt) and then I want to exit out.
Is there any way that I can make this happen automatically without my user having to enter y and enter? Ideally, I'd like to have the console-window even pop up while this is going on.
© Stack Overflow or respective owner