I am wondering how can i open a .exe file with my c++ program. Could some one give me the source code?
Printable View
I am wondering how can i open a .exe file with my c++ program. Could some one give me the source code?
just out of curiosity, how would I do something like this in non-windows operating systems?
Same.
I suggest reading this for other options under Linux.
c - Difference between "system" and "exec" in Linux? - Stack Overflow
Tim S.
And a Windows specific alternative:
ShellExecute function (Windows)
Of course it all depends on what you mean by opening an exe. One can open an exe for reading in the same way one opens a data file. A hes editor would do this, for example.
Generally the terms such as "launch", "start" or "run" are used to indicate that you want the program to execute.