How to know if wyUpdate is updating

I have implemented the automatic update by the AutomaticUpdaterBackend, but I have the problem that sometimes the user start the application just after the wyUpdate has closed it, so the two process hang.What can I do to check at the start up of my application if the wyUpdate is updating the application itself?

Thanks.Cristiano

but I have the problem that sometimes the user start the application just after the wyUpdate has closed it, so the two process hang.

What do you mean they hang? What version of wyUpdate.exe & AutomaticUpdater are you using? Is there an error thrown? Are you running the wyUpdate from a service?

What can I do to check at the start up of my application if the wyUpdate is updating the application itself?

You can't -- just use the API correctly and handle all events. Also, make sure your app isn't locking up.

I expressed myself badly, sorry.

After wyUpdate has downloaded the update, the program exit by CloseAppNow event, so wyUpdate start to apply the update; meanwhile the user "with the ham on the eyes" that ingore the wyUpdate windows 😉 , start the applcation before the end of updating. So, wyUpdate is blocked because some file is already locked by the program, and the program is blocke because some file is changing during the starup.

I would add, at startup of the program, a check about if the wyUpdate is applying the update so that it exits immediately: is it sufficent test the property ClosingForInstall? Do I have to test the UpdateStepOn property (which value)?

Thanks.Cristiano

So, wyUpdate is blocked because some file is already locked by the program, and the program is blocke because some file is changing during the starup.

If you're running AutomaticUpdater from a GUI app then the "blocking" shows a dialog that the app is running. If you're running the AutomaticUpdater from a Service then the "blocking" lasts for a short period of time (I think it's 60 seconds) before wyUpdate gets sick of waiting around and just outputs an error and exits.

If your app is blocking then you need to figure out why it does that. The AutomaticUpdater shouldn't block. Attach a debugger to your process and figure out what's happening.