Running an exe file from another exe file
I need to create a setup where there are two exe files in it开发者_如何转开发 and one exe must run after the other exe file. Is there way to do this without including a bat file? (Currently I'm using Visual Studio 2008 to create my setup)
Use CreateProcess() (watch out for the privileges!) or ShellExecuteEx()
You can use system()
function to execute other program. Its prototype is in stdlib.h
. This is simple method that will work on others than Windows systems too, but if you want more control you can use Windows API as in Bartosz response.
精彩评论