www.digitalmars.com         C & C++   DMDScript  

c++ - Executing a batch file from with a c++ program

reply "jim" <ploppy000 yahoo.com> writes:
Does anyone know how to kick off a batch file from within a C++ program ??
Nov 21 2002
parent reply Jan Knepper <jan smartsoft.us> writes:
You will have to invoke the command line processor and submit your .bat file
as argument.
Something like:
    system ( "cmd.exe /C file.bat" );
On Windows NT/2K/XP

Jan



jim wrote:

 Does anyone know how to kick off a batch file from within a C++ program ??
Nov 21 2002
next sibling parent "jim" <ploppy000 yahoo.com> writes:
Thanks...


"Jan Knepper" <jan smartsoft.us> wrote in message
news:3DDCF6F0.C76936BB smartsoft.us...
 You will have to invoke the command line processor and submit your .bat
file
 as argument.
 Something like:
     system ( "cmd.exe /C file.bat" );
 On Windows NT/2K/XP

 Jan



 jim wrote:

 Does anyone know how to kick off a batch file from within a C++ program
??

Nov 21 2002
prev sibling parent "Matthew Wilson" <dmd synesis.com.au> writes:
I'm pretty sure you can use ShellExecute also, if you prefer.

"Jan Knepper" <jan smartsoft.us> wrote in message
news:3DDCF6F0.C76936BB smartsoft.us...
 You will have to invoke the command line processor and submit your .bat
file
 as argument.
 Something like:
     system ( "cmd.exe /C file.bat" );
 On Windows NT/2K/XP

 Jan



 jim wrote:

 Does anyone know how to kick off a batch file from within a C++ program
??

Nov 21 2002