Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WaitForSingleObject problem

Status
Not open for further replies.

smoothcoder

Programmer
Sep 24, 2002
19
0
0
RO
Hi there.
I'm currently developing a setup application and I need to launch MSDE setup exe from my app. I use CreateProcess for launching MSDE setup; the problem is that I would like my app to wait for the completion of the MSDE setup program and then to display a MessageBox("MSDE setup complete") from MY app. I use WaitForSingleObject(handle, INFINITE) after the call to CreateProcess... but there comes a problem: the MSDE setup process seems to block. if I Ctrl+Alt+Del MY app, then the MSDE setup goes on successfully. WHY??
Is there any solution?

Thanks a lot, guys!
 
I belive you dont need to use threads unless you want your app to continue doing things in the background. A call to "system" will return the code from the install. Usually, a return of zero is successful. System wont return until it is complete.

Matt
 
Matt, could you write down two or three lines of code for me, please?
Thanks in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top