1

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.

Alex
  • 66,732
  • 177
  • 439
  • 641
  • Can you provide some more info? Is `program.exe` maybe a Windows command that doesn't terminate? – Marc Mar 27 '12 at 01:07
  • Use ```start /WAIT``` to launch ```program.exe```. – Heath Hunnicutt Mar 27 '12 at 01:07
  • it's [phpunit](https://svn.typo3.org/Teams/forge.typo3.org/hudson-helpers/tools/PHPUnit/PHPUnit-3.5/phpunit.bat). it terminates bc i can see when it finishes.. – Alex Mar 27 '12 at 01:08
  • c:\program.exe is not a batch file.... ;-) – Timmerz Mar 27 '12 at 13:30
  • yes, sorry i didn't think it would matter.. – Alex Mar 27 '12 at 19:51
  • I would say the pause is never running. does the window remain open if you take the pause out completely? perhaps the program is not exiting. you can try running the batch file via the command prompt as well so you can see what the output is when its finished. – Timmerz Mar 27 '12 at 01:06

2 Answers2

10

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
dbenham
  • 127,446
  • 28
  • 251
  • 390
1

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

Gameboyseb
  • 11
  • 1