Opening .exe files within .exe program.

Phire

Baseband Member
Messages
90
Hello. I'm using Dev-C++ 4.9.9.0. And I want to know how to open an .exe file in a DOS-based C++ program.

I already have a faint idea how to do it:

system("example.exe");


and "example.exe" has to be in the C:\WINDOWS folder

Correct, so far? Please help.
 
hmmm, or in the cwd...i suppose it depends if this program is normal windows or command line.
 
you can open any program with the system command,
just specifying the program name means that the system will look in the folders named in the environmental variable path (go to the dos prompt and type path)

if you want to open and other files you can specify the path inside of the quotes.

system("c:\somedir\program.exe");
 
Back
Top Bottom