Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

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

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
jimbox
Asked:
jimbox
1 Solution
 
ozoCommented:
"\t" is a tab character
0
 
jimboxAuthor Commented:
Thanks ozo.

Jim.
0
 
jmcgOwnerCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now