jimbox
asked on
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
ASKER
Jim.