• Advertisement

Archived

This topic is now archived and is closed to further replies.

run .exe function?

This topic is 5241 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Guest Anonymous Poster
To start notepad you''d do "system("notepad.exe";"

Share this post


Link to post
Share on other sites
#include <cstdlib>

using std::system;

system("program name");

--
Dave Mikesell
d.mikesell@computer.org
http://davemikesell.com

Share this post


Link to post
Share on other sites
If you''re using windows, then ShellExecute() or CreateProcess() are usually better than std::system().

Share this post


Link to post
Share on other sites
CreateProcess() or (preferably) CreateProcessEx(). system() can be used, but it''s blocking, which may or may not important for you.



"The sun is the same in a relative way,
but you''re older"
--Pink Floyd

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
blocking?

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
blocking?


"blocks" execution of the thread (/process) it''s called from until the work it''s doing finishes. i.e. system() doesn''t return until the application being executed has ended.

Share this post


Link to post
Share on other sites

  • Advertisement