Dos environment variables

I had a perfectly good DElphi 2 program which did some processing on a
file then sent that file to a dos post processing application. In
order for the dos application to run 2 environment variables need to
be set.  I set these in the original version in the autoexec file. In
error I recompiled the program in Delphi 4. It now appears not to
recognise the variables set in DOS and in fact seems to overwrite
them.  I have tried using a unit called environ (shareware) which does
not seem to alter the DOS  settings.

Any ideas welcome.

Regards
Stuart Kinnear