If the Command Interpreter CMD.EXE is actually running these programs the exit code one gets appears to be from that DOS "window", not the return code from the actual program that CMD ran. As far as the Interpreter is concerned, it did its job and so exits with 0, not the return code of the program it ran
Originally posted as a Categorized Answer.