Alex
Alex

Reputation: 68416

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.

Upvotes: 1

Views: 5840

Answers (2)

Gameboyseb
Gameboyseb

Reputation: 11

Try saving before opening the bat file, it worked for me

Upvotes: 1

dbenham
dbenham

Reputation: 130819

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

Upvotes: 10

Related Questions