
Execve is a DOS program that runs other DOS programs after
setting variables for the child program's environment.

The problem that Execve is meant to solve is that Codewright does
not provide a way to set the environment for its spawned processes.
In particular, the programmer may find it convenient to keep their
makefiles and batch files on a network drive.  Such files must be
kept free of machine-specific information, yet a build or compile
may rely on files residing on the local machine.

Ordinarily, limitations in Codewright are overcome by using the
API or by creating or modifying a DLL that Codewright calls.
There is no relevant API call; moreover, the problem can't be solved
from a DLL because a DLL cannot modify the environment of its
calling application.

Execve runs in a DOS session, so it can modify its own environment
at run time just before invoking the child program.

Syntax:
    execve [-Estring=value ...] [-Ffilename] prog.exe [parameters]

The -E switches let you specify environment variables and their
values on the command line.  The -F switch specifies a file from
which to read environment variable settings.

There must be no space following the -E and -F options.
The file designated by the optional -F switch must contain lines
of the form

	    string=value

just as given in the -E parameters.

If no filename is given with the -F switch, the default file
"execve.cfg" in the current directory is used.

If the same variable is set from a file given in a -F argument and
from a -E argument, the -E setting takes precedence.  If the same
variable is set in two -E arguments, the rightmost argument takes
precedence.

The program name may be any fully-qualified pathname to an executable,
or may be just the root name of an executable residing in a
directory that the PATH variable points to.  Any changes made to
the PATH setting by -E or -F arguments will be in effect.

After the name of the executable go any arguments for the executable.
Execve will not interpret any arguments beyond the initial -E and
-F switches.


Premia Corporation
February 1994

