Date: Mon, 9 Jun 1997 09:01:49 +0300 (IDT) From: Eli Zaretskii To: krusty AT miyares DOT slip DOT duq DOT edu cc: djgpp AT delorie DOT com, ckeenan AT scsn DOT net Subject: Re: Making system calls in DJGPP??? In-Reply-To: <5neop7$shn@news.duq.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On 8 Jun 1997, Real Email in Sig! wrote: > : I need to make a call to the system to run a file. > : > : If I run it like this: > : > : system("program.exe"); > : > : it works fine, but when I use a .bat to allow the user to configure > : the program being called, it just ignores it. > : > : How can I get it to run > : > : system("program.bat"); > : > : where program.bat is simply program.exe -1 -2?? > > I think you need to run a copy of command.com to execute a bat file. This is incorrect. Please don't post untested info. You can call `system' to run a batch file, and it should find COMMAND.COM and invoke it automatically. For example, the following short program works for me: #include int main (void) { return system ("foobar.bat"); } where `foobar.bat' is any batch file that pleases me, whether it is in the current working directory or on the PATH. Chris, can you please tell what version of DJGPP do you have, and what size and time stamp is your libc.a file in the DJGPP's lib subdirectory? Thanks.