Win95: Running DOS from Delphi 16-bit application

Here is something that works great in Windows 3.1, just perfect, but
crashes in Windows 95.

I use a self-extracting file (PKZIP) which runs in DOS. This is
incorporated into an installation routine, written in Delphi 16-bit.
All we do, is open the self-extracting file either in ShellAPI() or
WinExec(). These are simple windows API functions.

Both ShellAPI and WinExec() work fine under Win 3.1. Although not
required, PIF driver files of the same name can be used, all smooth as
butter. It is just a simple self-extracting DOS program that is run
from within the Delphi 16-bit application. After the command, the
GetModuleusage loop waits for the program to finish. While
GetModuleUsage(ProgHandle)<>0 do application.processmessages, etc. All
of this is just fine in Win 3.1.

Error messages appear if a user loads this 16-bit Delpi app on Windows
95 and tries to run it. I am at wits end about this.

I do not want to have to write and supply yet another setup routine
for Windows 95, the 16-bit one should be good enough. It works great
under Win 3.1, Win 95 should be compatible, why won't Win95 do it?

I have looked into the Win95 pif drivers, tried all setting for the
self-extracting programs there. The entire self-extract process has
error checking by the return handle. This is further wrapped in a
TRY..EXCEPT..END structure. Yet the problem that Win 95 has is never
trapped by the TRY..END structure.

I have also use winexec('c:\ /c myfiles.exe',SW_HIDE), i.e.
spawning a copy of This has the effect that the process
is no longer transparant and Windows95 switches to full screen DOS
mode regardless of PIFs or SW_Hide.

This is what Win95 says at the point at which the self-extracting DOS
program tries to run:

" An error has occured in your program. To keep working anyway, click
close and save your work in a new file. To quit this program, click
close. You will lose information you entered since your last save.
Options: Close and Ignore"

Then, after clicking ignore several times, Win 95 says:

"This program has performed an illegal operation and will be shut
down. If the problem persists, contact the program vendor."

Any ideas?

Please email me, I will thankfully reply.