http://bugs.winehq.org/show_bug.cgi?id=10822
--- Comment #5 from Hans Leidekker hans@it.vu.nl 2007-12-27 14:44:31 --- Found the bug. Dymola calls _spawnvp("as") with PATH set to C:\PROG~FBU\Dymola\egcs\bin and expects C:\PROG~FBU\Dymola\egcs\bin\as.exe to get launched.
This works with native msvcrt but builtin only tries with .exe appended after _searchenv turned up nothing and ends up calling CreateProcess on just "as.exe", which fails.
A trace with native msvcrt reveals that _spawnvp tries .com, .exe, .bat and .cmd as extensions, in that order, searching the current directory first and then any directory specified in PATH.