Mail Archives: djgpp/1999/05/30/05:25:49
On Sat, 29 May 1999, ^Hawk^ wrote:
> I want to execute a simple command line like "d:\temp\temp.exe
> command1 command2 ..." or "temp.exe" or "temp.exe command1". The path
> / the program and the commands (if given) are all in the same string.
>
> How can I execute those single strings via spawn or exec ?
You don't. If the command line is given as a single string, you
should use `system', not `spawn'. For example:
int result = system ("d:\\temp\\temp.exe command1 command2");
> Ohh ... the program which I want to execute out of my program is a dos
> real mode program and it should not executed within the 640KB because
> there is not enough free if my own program runs.
??? DOS real-mode programs can *only* run in the low memory, below
1MB. So you cannot get what you want, I'm afraid.
- Raw text -