Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting up another program from my C program

Status
Not open for further replies.

metamorphy

Programmer
Dec 16, 2001
34
0
0
US
Hello,

How can I use my program to start up another program on my system? For example, my program (Program1) creates a command file which sets the parameters for Program2. How can I start up Program2 from within Program1. Also, I would like to be able to continue using Program1 after it has started Program2. These are both dos programs.

 
It think you can use exec() to run the program2 from program 1
 
In general, this is OS dependent. The "exec()" system call is in general
available on Unix and Windows environments. Unix offers several variants
each with there own syntax. You also have the "system()" function call
and "popen()" if you wish to create a pipe IPC to that new program
from your original one but again, these are system dependent.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top