RocketBot icon indicating copy to clipboard operation
RocketBot copied to clipboard

Request: Auto Update feature

Open dutch2005 opened this issue 10 years ago • 3 comments

Since the tool is under heavy development, it would be sweet, if upon starting latest version could be downloaded..

https://autoupdater.codeplex.com/

AutoUpdater_alternative.zip https://autoupdater.codeplex.com/

How to use?

In the program that you want to be auto updateable, you just need to call the AutoUpdate function in the Main procedure. The AutoUpdate function will check the version with the one read from a file located in a Web Site/FTP. If the program version is lower than the one read the program downloads the auto update program and launches it and the function returns True, which means that an auto update will run and the current program should be closed. The auto update program receives several parameters from the program to be updated and performs the auto update necessary and after that launches the updated system.

  #region check and download new version program
  bool bHasError = false;
  IAutoUpdater autoUpdater = new AutoUpdater();
  try
  {
      autoUpdater.Update();
  }
  catch (WebException exp)
  {
      MessageBox.Show("Can not find the specified resource");
      bHasError = true;
  }
  catch (XmlException exp)
  {
      bHasError = true;
      MessageBox.Show("Download the upgrade file error");
  }
  catch (NotSupportedException exp)
  {
      bHasError = true;
      MessageBox.Show("Upgrade address configuration error");
  }
  catch (ArgumentException exp)
  {
      bHasError = true;
      MessageBox.Show("Download the upgrade file error");
  }
  catch (Exception exp)
  {
      bHasError = true;
      MessageBox.Show("An error occurred during the upgrade process");
  }
  finally
  {
      if (bHasError == true)
      {
          try
          {
              autoUpdater.RollBack();
          }
          catch (Exception)
          {
             //Log the message to your file or database
          }
      }
  }
  #endregion

that’s it,just enjoy it!

AutoUpdater.NET 1.3.1.zip

dutch2005 avatar Aug 01 '16 22:08 dutch2005

Thanks, will definitely​ consider this solution

brianzhouzc avatar Aug 01 '16 23:08 brianzhouzc

We added it! More likely the next update will get it.

RonnieNine avatar Aug 17 '16 08:08 RonnieNine

Awesome!!

dutch2005 avatar Aug 17 '16 09:08 dutch2005