ClosingAborted / LoadSettings

Hi

I have watched the demo video several times and cant quite understand the part on the automatic updating.

Why would i want to call my LoadSettings in the ClosingAborted event and why would this updater be "closing" in the initialisation of my app?

Perhaps you could exapnd on this a little?

Thanks

Why would i want to call my LoadSettings in the ClosingAborted event and why would this updater be "closing" in the initialisation of my app?

The AutomaticUpdater checks everytime your app starts to see if an update is ready to install. If there is, it quickly closes your app and starts wyUpdate to finish the installation.

Now one of 2 things can happen:

  1. Everything goes fine - your new version installs and wyUpdate starts the new version. (Happens 99% of the time)
  2. Your users deletes the downloaded updates, or something else goes wrong.

In case #2, wyUpdate aborts and tells the AutomaticUpdater to stop closing your app, and instead start it as normal.

So if you followed the advice in the video, you called this in your constructor:

if (!automaticUpdater.ClosingForInstall)    LoadSettingsEtc();

And since the closing was aborted you now need to call "LoadSettingsEtc()" before your app continues executing.

Does this make it clear?

Yes it does thanks.

I have my app updating using the updater nicely now - just waiting on the .net4 build to add it to the app itself