Race condition on update install?

I have noticed on occasion that when I close my application after an update was downloaded, then open my app to install the updates, I get a message that my application must close before the update can continue. I do not always get this message. Sometimes it says up and I have to dismiss it and other times it goes away on its own.

Is there a way to prevent this - like a timer somewhere that will give the app time to close before the updater starts?

As soon as your app closes that screen disappears. So the way to prevent that screen from appears is to close your app as quickly as possible.

If the screen doesn't close by itself then that means your app is still running.

If you're using the AutomaticUpdater then make sure the cleanup happens before InstallNow() is called. If you're using wyUpdate in "standalone" mode, then make sure you cleanup everything (to prepare for a quick exit) before you run wyUpdate.

I do not have any custom code - it is the standard autoupdater and wyupdate code. I assume that the standard code would have a wait capability to test for the app to be closed before it proceeds. Is that not the case? Do I need to write custom code to do this?

No, I'm saying *in your code* make sure you handle all the slow stuff before your app shuts down. You don't need custom wyUpdate / AU.

I must be missing something. The auto updater detects the update then downloads it. It says "will install on next start of the application" (or something close to that). So I close the application, then restart it. It is at that point that sometimes all goes well and sometimes I get the error.

Am I doing something wrong?

We fixed this bug in wyUpdate/AU 2.6.18.4. What version of wyUpdate.exe and AutomaticUpdater are you using?

When I look at About it tells me I am at 2.6.18.0 and when I check for updates it says I am up to date. 🙁

I will re-download and try it again.