https://bugs.winehq.org/show_bug.cgi?id=52107
--- Comment #3 from Florian Eder others.meder@gmail.com --- The CMD seems to distinguish between batch mode and interactive mode in this case. In batch mode ERRORLEVEL is reset to 0, in interactive mode it is not.
This seems to be consistent since (at least) Windows XP. Probably a bug in the Windows CMD that only applies to one of the two modes?