I have an old executable that runs on the command line. It prompts the user interactively for specific pieces of information. What I would like to do is to wrap the all the interaction of this command into a batch script so that it just runs and answers the prompts without a user having to interact.
This is different from simply executing a command with arguments. The executable prompts the user. Paraphrasing the way it works...
C:\MyDir>legacy.exe
Welcome to old program.
Please enter your name:
> John Smith
How many widgets are you buying:
> 47
Great, generating the PO file now...
Goodbye.
Ideally, I would like to actually wait for the prompts and respond to each accordingly. I can do that in .NET with the Process object, but I'd like to attempt this using a windows batch script. If I can't parse the prompts and just need to blindly dump arguments, I'll take that as well.
I see another question where the answer was to use VBScript. Is there a way to do this in plain batch script?