Hi.
I'm having huge problems with AutomaticUpdaterBackend. I use it for updating my windows services. I tried all four modes (Automatic, CheckAndDownload, OnlyCheck and DoNothing), and only Automatic works 100%. The other three all go stuck before the update process has completed.
My system:
- Windows XP Professional SP3
- .NET 4.0 (yes, I use the 4.0 version of AutomaticUpdater.dll)
- wyBuild 2.6.14.0 (the most recent version)
Here are my observations:
Automatic mode (works):
==============
1) I call ForceCheckForUpdate()
2) I get the BeforeCheck event
3) I get the ProgressChanged event (100)
4) I get the BeforeDownloading event
5) I get a row of ProgressChanged events (7% to 100%)
6) I get a BeforeExtracting event
7) I get a row of ProgressChanged events(0% to 83%)
8) I get a ReadyToBeInstalledEvent
9) I call InstallNow()
10) The service rastarts in its new version. Everything OK.
Note: If one of the original files to update are missing, I get an UpdateStepMismatch event an an extra row of ProgressChanged events. I assume this is when the system takes the "all.to.x.x.x.x" update file into use. But
the system still works.
CheckAndDownload mode (with clean files to be updated - works):
===========================================
1) I call ForceCheckForUpdate()
2) I get the BeforeChecking event
3) I get the ProgressChanged (100) event
4) I get the BeforeDownloading event
5) I get a row of ProgressChanged events (6% to 100%)
6) I get the ReadyToBeInstalled event - UpdateStepOn shows: UpdateDownloaded
7) I call InstallNow()
8) I get the BeforeExtracting event
9) I get a row of ProgressChanged events (0%-83%)
10) I get a new ReadyToBeInstalled event - UpdateStepOn shows: UpdateReadyToInstall
11) I call InstallNow() anew
12) The service restarts in its new version. Everything OK.
CheckAndDownload mode with a missing file - DOES NOT WORK:
=========================================
1) I call ForceCheckForUpdate()
2) I get the BeforeChecking event
3) I get the ProgressChanged (100) event
4) I get the BeforeDownloading event
5) I get a row of ProgressChanged events (6% to 100%)
6) I get a ReadyToBeInstalled event - UpdateStepOn shows: UpdateDownloaded
7) I call InstallNow()
8) I get a BeforeExtracting event
9) I get a row of ProcessChanged events (8% to 83%)
10) I get an UpdateStepMismatch event
11) I get a longer row of ProgressChanged events (3% to 100%)
12) I get a new BeforeExtracting event
13) I get a row of ProgressChanged events (0 to 85%)
14) I get a ReadyToBeInstalled event - UpdateStepOn shows: UpdateReadyToInstall
15) I call InstallNow() anew
16) NOTHING HAPPENS.... SYSTEM HAS GONE STUCK! UpdateStepOn keeps on showing UpdateReadyToInstall...
OnlyCheck mode - DOES NOT WORK (not even with clean original files)
=================================================
1) I call ForceCheckForUpdate()
2) I get the BeforeChecking event
3) I get the ProgressChanged (100) event
4) I get the UpdateAvailable event
5) I call InstallNow()
6) I get a BeforeDownloading event
7) I get a row of ProgressChanged events (6% to 100%)
8) I get a BeforeExtracting event
9) I get a row of ProgressChanged events (0% to 83%)
10) I get a ReadyToBeInstalled event - UpdateStepOn shows: UpdateReadyToInstall
11) I call InstallNow() anew
12) NOTHING HAPPENS.... SYSTEM HAS GONE STUCK! UpdateStepOn keeps on showing UpdateReadyToInstall...
DoNothing mode - does NOT work (not even with clean original files)
=================================================
1) I call ForceCheckForUpdate()
2) I get the BeforeChecking event
3) I get the ProgressChanged (100) event
3) I get the UpdateAvailable event
4) I call InstallNow()
5) I get a BeforeDownloading event
6) I get a row of ProgressChanged events (6% to 100%)
7) I get a BeforeExtracting event
8) I get a row of ProgressChanged events (0% to 83%)
9) I get a ReadyToBeInstalled event - UpdateStepOn shows: UpdateReadyToInstall
10) I call InstallNow() anew
11) NOTHING HAPPENS.... SYSTEM HAS GONE STUCK! UpdateStepOn keeps on showing UpdateReadyToInstall...
I would like to use the DoNothing mode, that fires the UpdateAvailable event before downloading, because this way I can the offer the operator not to update this time but simply await the next update to come up instead. All it takes to do this is to call ForceCheckForUpdate( true ) repeatedly after the UpdateAvailable event (instead of InstallNow()) until another update shows up (another UpdateAvailable event will then fire).
Please investigate why CheckOnly and DoNothing modes don't work at all, and why CheckAndDownload mode does not work when original files have been messed with.
- Martin.