How to make a batch file that send application an input char

一世执手 提交于 2019-12-01 06:53:11
David R Tribble

Other than using echo as @npclaudiu suggested, you could also write the expected input to a text file and then have the app read the file:

app.exe <input.txt

This works if the app expects more than one line of input.

First, make sure if the application supports command line arguments. For example, at your command prompt, type:

C:\> app.exe /?

or

C:\> app.exe -h

or

C:\> app.exe --help

If it doesn't, try using

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