Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 04-07-2005, 11:50 AM   #1
Solid State Member
 
Phire's Avatar
 
Join Date: Feb 2005
Posts: 7
Default Opening .exe files within .exe program.

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.
__________________

Phire is offline   Reply With Quote
Old 04-07-2005, 12:16 PM   #2
Daemon Poster
 
Tulsileaf's Avatar
 
Join Date: Jul 2004
Posts: 1,249
Default Re: Opening .exe files within .exe program.

hmmm, or in the cwd...i suppose it depends if this program is normal windows or command line.
__________________

__________________
(|141 73g ()7 (|33|/| 11143s| |_| z1|-|7 (|43s| |/|4> |_| |-|0|1
Tulsileaf is offline   Reply With Quote
Old 04-08-2005, 07:12 AM   #3
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,007
Default Re: Opening .exe files within .exe program.

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");
root is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 05:56 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0