Error while trying to write inputs to running console app with a batch

谁说胖子不能爱 提交于 2020-08-20 12:09:17

问题


I have an exe file that I want to execute with a batch file.

Exe file is a third party console app that will prompt for input three times.

So I want to fill it in with an empty line, someText and someOtherText

(echo. echo someText echo someOtherText) | call config.exe remove

But I'm getting this error:

Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.

What could be the issue, please advise at least the direction to search?

I have the same error even if try to execute a simpler command like:

echo. | call config.exe remove

Update:

Please tell in the comment why is it downvoted. Is it unclear or not useful or should I somehow show more effort?

来源:https://stackoverflow.com/questions/63487524/error-while-trying-to-write-inputs-to-running-console-app-with-a-batch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!