"Leila Y" <ly*****@yahoo.com> wrote in message
news:2d**************************@posting.google.c om...
Dear Friends,
I need to execute an executable file (*.exe) within visual c++ program.
I have used " system function " for this purpose and it works in most of
the time but sometimes while performing this command it can't close the
MS DOS prompt window and return from it .
I want to know how I can solve this problem and
if there is another way to execute (*.exe) within visual c++ program.
Thanks.
Hello
AFAIK, system() (in Windows OS) will use the program specified in %COMSPEC%
environment variable with a /C parameter to launch your program.
A better alternative to execute a program is to use the Windows' specific
functions WinExec(), CreateProcess() or ShellExecute[Ex].
For more information about this, try posting in
microsoft.public.win32.programmer.kernel
Regards,
Elias