暂停命令不是在蝙蝠脚本工作 [英] Pause command not working in .bat script

查看:109
本文介绍了暂停命令不是在蝙蝠脚本工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

批处理文件只有两行:

c:\program.exe ...
pause

但暂停开不方案后运行完成......我没有看到,preSS任意键消息:(

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.

推荐答案

因为你不是直接运行可执行它失败 - 您是通过phpunit.bat批处理文件运行它(基于注释信息添加到问题)。

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

这篇关于暂停命令不是在蝙蝠脚本工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆