Archived

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

BlackBox

c++ question : running a .exe file

Recommended Posts

BlackBox    150
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
Lektrix    106
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