joe_pool_is Posted September 20, 2005 Posted September 20, 2005 In a C++ application, I need to call the external program "setup.exe" and then exit quickly. "setup.exe" performs updates on the program that calls it. Windows has an API called CreateProcess() that I am thinking about using, but their example on http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/creating_processes.asp shows WaitForSingleObject() and CloseHandle() calls immediately after. I can not wait. The program needs to shut down immediately after calling the external program "setup.exe". Is there a different way to call CreateProcess() that is better for my situation, or do I need to use something else? Quote Avoid Sears Home Improvement
Administrators PlausiblyDamp Posted September 20, 2005 Administrators Posted September 20, 2005 Could you not just call CreateProcess and then exit without waiting or closing the handle yourself? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
sgt_pinky Posted September 21, 2005 Posted September 21, 2005 You don't need to use the API though, it's wrapped in the .NET Framework: Process.Start("c:\setup.exe") **EDIT** There is a bug in the [ vb ] tags that has removed my '\' after c: there. It's definitely there. Quote
joe_pool_is Posted September 22, 2005 Author Posted September 22, 2005 Thanks. From the example, I understood that I had to wait for the thread to complete. That's what I needed. Maybe Microsoft could update their MSDN site to include that information one day. :) Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.