On Mon Jan 26 09:54:25 2026 +0000, eric pouech wrote:
One small, but sometimes critical, issue that you cannot receive exit code other than "0" from `cmd msiexec` because, as far as I understand, `cmd` ends immediately, without waiting for the spawned subprocess. that's normal behavior for cmd not no wait for a program in windows subsystem (which msiexec is) (untested) this may do what you expect (wait for program termination and return msiexec exit code) `echo 'start /wait /b msiexec /i some.msi INSTALLDIR="C:\Path with spaces\data"' | wine cmd` Thank you! I found the next solution:
```sh echo 'start /wait /b msiexec /p some.msi INSTALLDIR="C:\Path with spaces\data" & exit !errorlevel!' | wine cmd /v:on MSIEXEC_ERRORCODE=$? ``` "`/v:on`" functions similar to `SETLOCAL EnableDelayedExpansion`, so `exit !errorlevel!` will exit with the error code of msiexec. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9943#note_128534