Mail Archives: djgpp/1997/06/09/02:05:49
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 <stdlib.h>
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.
- Raw text -