in reply to Executing a Dos command

First of all, thanks for the replies!
Sorry for not being more clearer on the question. I would like to get a little more clarification, when I use for example the system(), will this allow the program to stay up and running?
basically what I want this program to do is the following:
1. Create a schedule task that runs every hour.
2. Check the process by using ntprocinfo.
3. If the process is not on the list to start it.
When I execute the program manually from the DOS Shell, basically what it does it connects to a database and sends the data to the database and stays listing. Another program generates the data and goes thru the same cycle.
Thanks in advance.