How to properly report an exit status in batch?
As @dbenham notes, “[i]f a command is parsed after EXIT /B, within the same command block, then the problem manifests, even though the subsequent command never executes”. In this particular case the body of the IF statement is basically evaluated as (echo first if) & (exit /b 1) & (if “” == “” (echo second … Read more