1

I am working on an Updater application containing two application named as Updater and MainApp. The Updater App uses web service to check for updates and update the MainApp. I am able to achieve updation when update button is clicked, for single next update.

The problem is that if multiple version of updates are available the application should be able to update itself to those versions sequentially and finally should be in latest version in a single update button click. I mean to say that user should not click update button each time for every single update, a single update click should update application to its final version

E.g if current version is 1.0.0.0, and available versions are 1.0.2.0, 2.0.0.0, 3.0.0.5. Then the application should update itself to 3.0.0.5 without missing the updates 1.0.2.0 and 2.0.0.0.

Please share your ideas,

Thanks

Sanket

  • how about just updating to the next version and then rerun check? – Vogel612 Jun 01 '13 at 14:20
  • @Vogel612: That works but then the user will again have to click check for updates. The objective is to directly updating app to latest version without annoying user and without missing any updates. – user1790564 Jun 06 '13 at 05:40
  • you didn't understand. i formulated my thoughts in an answer – Vogel612 Jun 07 '13 at 07:49

2 Answers2

0

You can check the latest version on button click, and then sort available updates which is greater than your current version and lesser than or equal to latest version, and do update multiple times.

VahiD
  • 1,014
  • 1
  • 14
  • 30
0

well as far as i understood you have some method

public void checkForUpdates(object sender, EventArgs e){
    //Check if updates are available and call Update(string version);
}

this method checks for updates and, if there are any available will update.
I suggest you make it call another function to update to next version only and recheck:

public void update(string version){
    //Update to next version (and only to next version)
    //and then call check again, so you will update to the next and so on, 
    //till you are on newest version
    checkForUpdates(null, null);
}

you will need to update "each version after another" anyway, so this is the easiest way to maintain actuality and easy programming as well as readability

Vogel612
  • 5,620
  • 5
  • 48
  • 73