So you have a Windows .BAT file that is calling eggPlant and echoing and then returning the result of the test.
What you have written works and I’ve verified that it does return the eggPlant status as the exit code for the BAT file. So really it’s a question of how does your “other program” interpret exit codes when it calls a BAT file, that really is the heart of the question, but it depends on the other program.