• Advertisement

Archived

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

c++ question : running a .exe file

This topic is 5408 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

How do you start running a .exe file from your program? (as a separate program not inside) ps. Im using visual c++ .net cheers. ---------------------------- ^_^ [edited by - BlackBox on May 1, 2003 6:46:22 AM]

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by Burning_Ice
i think ShellExecute() is what you want


Yes, ShellExecute() is pretty easy to use. Here is an example of how you would use it in your case:

#include <windows.h>

ShellExecute(NULL, "open", "associatd_program.exe", NULL, NULL, SW_SHOWNORMAL);

And here is a link to the MSDN library documentation page.

[ Google || Start Here || ACCU || MSDN || STL || GameCoding || BarrysWorld || E-Mail Me ]

Share this post


Link to post
Share on other sites
Well I have Borland C++ 4.51 and I use


WinExec("MyProgram.exe",SW_SHOWMAXIMIZED);

for examle.

Share this post


Link to post
Share on other sites

  • Advertisement