How do I call an exe from my C program?
Posted on: Mon, 2007-02-26 23:29
How do I call an exe from my C program?
Hi,
I want to call notepad.exe/any executable from my C program. How do I do that?
Thanks

use the system call spawnl as
spawnl("test.exe");
Samar
u can call any .exe file using "system" function in windows tcc...
Ya, and you can also do this in linux while using GCC, you can use -
system("command_name");
to run that command but this is not a very good way of programming as you are assigning root privileges to the program. Instead it's always advisable to use execvp coammand and let the shell to the job for you.