Using UpdateAvailable event

I am attempting to put a message up to the user when an update is available and hiding the autoupdater icon. I have the following code in my application:

Private Sub MainWin_Load()

if not autoupdater.ClosingForInstall then autoupdater.ForceCheckForUpdates() endif

....

Then I also havePrivate Sub autoupdater.UpdateAvailable (...) Handles autoupdater.UpdateAvailable Msgbox ("Updates Available")end sub

I never get the message box. I don't have the icon hidden right now so I see the autoupdater going to get the update. What am I missing or doing wrong?

The AutomaticUpdater only calls that event if you have the UpdateType to "CheckOnly". Otherwise the AutomaticUpdater continues to the next steps.

OK. Right now I have it set for automatic. I assume that when I get the UpdateAvailable event triggered, I need to make the appropriate call to start the download. What event do I call?

One other probably stupid question - I am attempting to debug my application and it has already downloaded the udpate and is telling me it is ready to be installed. How do I reset that so I can test that I am getting into the UpdateAvailable event?

, edited

You call the InstallNow() method.

Does InstallNow download and install or just download? I think I like the idea that it can download in the background and then next time the user starts the app it will actually install.

It proceeds to the next step (for checkOnly, it would proceed to download, extract, and then wait for InstallNow() again or wait for the user to restart your app).

Thanks. I will give it a try.

One other probably stupid question - I am attempting to debug my application and it has already downloaded the udpate and is telling me it is ready to be installed. How do I reset that so I can test that I am getting into the UpdateAvailable event?

How do I reset that so I can test that I am getting into the UpdateAvailable event?

Rebuild wyUpdate (click t he Build wyUpdate button in wyBuild). Make sure the "old" version is selected in the dropdown.

I rebuilt it and I still get "Updates are ready to install". Do I need to clear a cache or some temp directory perhaps?

Sorry, I read your question too fast. Just proceed with the installation. Then you can replace the client.wyc file.

If you want to make it easy, then when you're testing this all out, use a blank upgrade. That is, nothing has changed (the old version and new version are completely empty).