Trying to run an program from within a visual C++ 2010 program

I am trying to call an exe from within a visual c++ 2010 program.

I need to pass in parameter that indicates which environment to use, ie dev, QA or production. I then need to use the parameter in reading a text file to find the location and exe to run. I also need to using the parameter when running the exe. i.e. c:\progpath\prog.exe dev. I have figured out reading in the parameter as well as finding the location of the exe. I some assistance in figuring out how to get the exe to run. Thank you
use this function:
system("START yourapp.exe parameters")
Last edited on
I'm pretty new at C++, can I use a variable for the <yourapp.exe> and the parameter?
i.e. system("START " + str1 ) where str1 has the exe info and the parameter.
Thank you
Last edited on
Topic archived. No new replies allowed.