Date: Sun, 30 May 1999 12:20:38 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: ^Hawk^ cc: djgpp AT delorie DOT com Subject: Re: spawn !? In-Reply-To: <37501cf1.71827221@news.luebeck.netsurf.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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.