How to call B.exe from A.exe and then stop A.exe
> I want to write a program (say, A.exe) that can run another program (say,
> In VC, I know I can use "system" function to execute B.exe from A.exe.
> But I want to stop A.exe after B.exe starts to run, I do not how to do
> Is there anyone can give me an idea?
Sure, from within A, you use exec() c function or other win32 API to start
B. Then in A, keep checking if B process running. If yes, exit itself. Or
better from B, send a Windows message to signal A to terminate itself.
Actually, since A starts B while A still running, why not just start B and A
quit itself? Isn't that what you asked for or I mis-read something?