thanks the MR the fixes look overall ok (except some error handling nitpick) the tests shall be reworked: * these tests should be moved into test_builtind.cmd (and its clone in test_builtind.bat); in the "echo --- success/failure for basics" section * you shall not call cmd recursively (and the drawback of it is that the ERRORLEVEL you test at the end is the one of the crash in cmd.exe subprocess, not the result of a too long path, which is AFAICS 9009 (RETURN_CODE_CANT_LAUNCH) (I guess you did it thay way so that the first tests could run) * this is a (rare) case when you shall squash test + fixes in a single commit (as tests could either crash or corrupt stack with side effects) * do you actually need the 4 instances of the tests? AFAICS the changes only concern the length of the strings, and the presence of space (or not) looks orthogonal to the issue you're targetting; a single instance with a relative path \> MAX_PATH (this avoids having the test relying on a drive that you're not sure it exists -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10629#note_135862