how to launch a .exe file from the OF code

I tried a lot of things ( for windows 7) but am not able to launch a .exe file from within my code. I did it using system() but I want to run it in a new process instead so that I can run other things in the background, i.e. by CreateProcess() , it is giving some weird errors from inside the header files !

Are you running into runtime errors or compile errors?