I am not sure whether there is a way to
Launch an external application, and block current application till the launched application had quit.
Currently, I am using the following non-blocking method (MFC) to launch
std::string str = "Notepad2.exe";
// Non-blocking. Return immediately.
WinExec(str.c_str(), SW_SHOW);
ShellExecuteExwithSEE_MASK_NOCLOSEPROCESSwill (among other things) give you a handle to the new process. You can do aWaitForSingleObjecton that handle, which will be signaled when it terminates. BTW, for a GUI program, this is almost always a bad idea — making your GUI unresponsive until another program exits is really a poor idea.