使用批处理运行带有参数的exe [英] Running exe with parameters using batch
本文介绍了使用批处理运行带有参数的exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将参数传递给运行exe的批处理文件?我有需要2个参数的程序,我想使用带有已定义参数的bat文件将其运行5次5次.像这样的东西:
How can I pass parameters into batch file running exe? I have program which requires 2 parameters, and I want to run it 5 five times using bat file with defined parameters. Something like that:
FOR /L %%G IN (1,1,5) DO start "path" program.exe -20 -15
其中20和15是参数.它不能识别20和15,那么如何定义呢?
where 20 and 15 are parameters. It doesn't recognize 20 and 15, so how can I define it?
推荐答案
根据您的注释,您不使用参数,而是使用程序输入.那是完全不同的故事.试试:
according to your comment, you don't use parameters, but program input. That's a completely other story. Try:
FOR /L %%G IN (1,1,5) DO (echo 20 & echo 15)|program.exe
这篇关于使用批处理运行带有参数的exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文