in reply to Command Line Program Wrapper

SimonPratt mentioned that this might be an XY problem. To further clarify the terminology, here is one of many links that explain what that is: http://xyproblem.info/. If you back up a bit and explain more about X to us, there may be some really simple solution to the problem.

Update: perhaps an example...some of these things ask a fixed set of questions in the same order every time, in that case sometimes all that is needed is a file with "the answers" which gets redirected into the program. It might or might not be necessary to "read the questions".