it's not clear to me how you run the windows test when you report failure? since it works locally for me, and also on the various tests env [1], there could be some discrepancy in settings? what could differ: - HKLM / HKCU registry entry for L"Software\\Microsoft\\Command Processor" which sets some bits (we likely need to run a couple of cmd.exe instances with /D which is not done yet) - some copy related env variables (eg COPYCMD) is set (we should propably always define a proper value for the tests though) - you somehow run the tests through an interactive cmd.exe prompt while the tests usually are not - you have leftovers in current directory (various files) from previous run, and testing from an empty directory could help [1] just reran testbot on upstream Wine for cmd.exe:batch tests: https://testbot.winehq.org/JobDetails.pl?Key=160395 which shows no error on windows VM -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9112#note_119356