How to do a verbose update

Hi,

I bought last month your component and I'm trying do this:I need to do a verbose update in my wpf app. The application must display a message "An update is available. Download now?"after clicking yes a form will open with "download now" button and a progress bar. After downloading, an "Install now" button appear to do the update. Moreover I need a button "Update now" in the app that force to check for updates...this because may be the app will be updated more that one time a day and I see that on the second, third update the UpdateAvailable event is not invoked even f I set DaysBetweenChecks to 0.

Here is my approach:

automaticUpdater1.UpdateAvailable += new EventHandler(automaticUpdater1_UpdateAvailable); void automaticUpdater1_UpdateAvailable(object sender, EventArgs e) { .....here show messagebox "An update is available" is user press ok: Update update = new Update(); update.ShowDialog(); }

in the Update form:

private void window_Loaded(object sender, RoutedEventArgs e) { mainForm.automaticUpdater1.ProgressChanged += new wyDay.Controls.UpdateProgressChanged(automaticUpdater1_ProgressChanged); mainForm.automaticUpdater1.ReadyToBeInstalled += new EventHandler(automaticUpdater1_ReadyToBeInstalled); }

private void DownloadUpdate_Click(object sender, RoutedEventArgs e) { mainForm.automaticUpdater1.InstallNow(); }

void automaticUpdater1_ProgressChanged(object sender, int progress) { this.progress.Value = progress; }

void automaticUpdater1_ReadyToBeInstalled(object sender, EventArgs e) { btInstallNow.Visibility = System.Windows.Visibility.Visible; }

private void btInstallNowClick_Click(object sender, RoutedEventArgs e) { mainForm.automaticUpdater1.InstallNow(); }

Now the problem is:

if I force the update (as I said before the updater don't check it automatically because may be the second update during the same day ) with automaticUpdater1.ForceCheckForUpdate(true); the UpdateAvailable event is raised, the Update form open but when I click "download now" button nothing happens (no progress changed is raised) If I restart application, UpdateAvailable is raised automatically (without forcing) and all works fine.

Help me,Sergio CapozziPhotocity.it

Hey Sergio,

The default UpdateType of the AutomaticUpdater is "Automatic". So, when a new update is found it's automatically downloaded, extracted, and prepared for installation.

Have you tried just using the AutomaticUpdater's default behavior? That is, watch what the AutomaticUpdater does and how it handles updates?

Completely automatic update works good but I wants to have a personalized form with a progressbar.After some tests I noticed that the problem seems to be when I call ForceCheckForUpdate, the UpdateProgress event and UpdateReadyToInstall events are not raised. I tried all the UpdateType configurations.

Regards

What's the return code for ForceCheckForUpdates()? If it's false then it means the updates weren't checked for (because there's another update pending). Use "UpdateStepOn" to get what step the AU is currently on.