?
Solved

execl command to run another *.exe program inside C program

Posted on 2003-02-26
4
Medium Priority
?
274 Views
Last Modified: 2010-08-05
I am trying write a C program to using execl to run another *.exe program.

Here's an example in C.

==== foo.c =====
#include <stdio.h>
#include <process.h>
int main(void) {
  execl("c:\tool", "rmtool.exe",NULL);
  return 0;
}

in dos:
ren foo.exe foobar.exe

copy /b foobar.exe+rmtool.exe foo.exe

running foo.exe will execute rmtool.exe

Does anyone know if it's I can do something like what I describe?

Thanks.

Jim
0
Comment
Question by:jimbox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 200 total points
ID: 8031326
"\t" is a tab character
0
 

Author Comment

by:jimbox
ID: 8045629
Thanks ozo.

Jim.
0
 
LVL 20

Expert Comment

by:jmcg
ID: 9692168
Nothing has happened on this question in over 8 months. It's time for cleanup!

My recommendation, which I will post in the Cleanup topic area, is to
accept answer by ozo.

Please post any comments here within the next seven days. Moderators check comments here before acting on the recommendation. Experts: silence will likely be taken as assent.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jmcg
EE Cleanup Volunteer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question