views:

145

answers:

2

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)

+1  A: 

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.

Michał Niklas
+3  A: 

Use CreateProcess() (watch out for the privileges!) or ShellExecuteEx()

Bartosz Wójcik