|
ShellExecute is the best way to execute a program and get information about the resulting process. (i.e. you can wait for it to spin up using WaitForInputIdle). With the handle you can use WaitForSingleObject to detect when the process has exited.
You could also use CreateProcess (which ShellExecute, WinExec, etc probably all map down to behind the scenes) , but it requires a zillion parameters that you probably don't care about (like security context, etc)
|