How do I open a process that isn't connected with my program in C? for example: if the user enter the following input: start C:\Windows\calc.exe
then the calculator will open. thanks.
How do I open a process that isn't connected with my program in C? for example: if the user enter the following input: start C:\Windows\calc.exe
then the calculator will open. thanks.
Processes are not known by the C standard. You can code in standard C for a system without processes (e.g. bare metal, or MS-DOS).
On Posix compliant systems, you could use popen(3) (with fscanf
and pclose
).
You may also use the system(3) function.
Your operating system may have a non-Posix interface. Please dive into your system's developer documentation.