1) please start by adding tests, also exhibiting which component enforces the limitation (you can start by kernel32/kernelbase, msvcrt/ucrtbase could also play some role at some point) 2) I'm not sure that not inheriting some env variables (whatever the criteria) (in the back of the user) is a good idea IMO, it's safer (in cases like yours) to wrap wine inside a shell script that will reset the unneeded env variables (and decide here what are the variables that can be dropped). 3) enforcing the 32k limit on process creation and on variable creation/modification shall be desirable in Wine.