Pause command not working in .bat script

The batch file has only two lines:

c:program.exe ...
pause

but pause does't run after "program" completes... I don't see that "press any key message" :(

If I move pause on the first line, then it magically works.


It fails because you are not running an executable directly - you are running it via the phpunit.bat batch file (based on information in comment added to question).

You must CALL a batch file from within another batch file if you want to return to the caller

call phpunit
pause

尝试保存之前打开bat文件,它为我工作

链接地址: http://www.djcxy.com/p/30340.html

上一篇: 批处理文件命令PAUSE不起作用

下一篇: 暂停命令在.bat脚本中不起作用