问题
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