Downloads  |  Buy

Downgrade Later

Downgrade Later

Postby WMM » March 10th, 2019, 6:59 am

I know a cancelled update can revert the update back to the version before it started.

Is there a way to do that later manually? Lets say a computer has version 1, updates to version 1.1. Then, say, an hour later, can I tell it to go back to version 1?

Thanks! Obligatory request for new version/willingness to pay more or yearly.
WMM
 

Re: Downgrade Later

Postby tziaoni » March 11th, 2019, 8:24 am

Take a look at this: https://wyday.com/wybuild/help/wyupdate-commandline.php#uninstall
tziaoni
 
Posts: 31
Joined: November 11th, 2015, 3:28 am

Re: Downgrade Later

Postby LCIII » March 28th, 2019, 1:33 pm

tziaoni wrote:
> Take a look at this:
> https://wyday.com/wybuild/help/wyupdate-commandline.php#uninstall

I'm sorry, I don't see how this answers the original question. Could you expand a bit? I'm also wondering how to revert deployments.
LCIII
 

Re: Downgrade Later

Postby Wyatt » March 28th, 2019, 2:27 pm

To downgrade a customer will have to uninstall your app and install an earlier version. Also, if an update fails while in progress wyUpdate will rollback automatically.

We don't plan to add the ability to roll back successfully installed updates. If you want to release a new version of your app that uses old binaries, you can do that.
User avatar
Wyatt
Site Admin
 
Posts: 5865
Joined: July 11th, 2007, 10:30 pm
Location: New Hampshire

Re: Downgrade Later

Postby LCIII » March 28th, 2019, 3:22 pm

Wyatt,

Here is a little hack that allows my app to update to whatever version I want whether it's a new one or old one.

Basically in addition to the client.wyc file that exists alongside my program, I include another *.wyc client file called clientBaseVersion which is set to version 0.0.0 of my application. Then in the AutomaticUpdater portion of my code I run this code below right before I run ForceCheckForUpdate:

// ...code is in C#
if (File.Exists("clientToDelete.wyc")) File.Delete("clientToDelete.wyc");
File.Copy("clientBaseVersion.wyc", "clientBaseVersionCopy.wyc");
File.Move("client.wyc", "clientToDelete.wyc");
File.Move("clientBaseVersionCopy.wyc", "client.wyc");

This changes the client.wyc to version 0.0.0 just before I check for updates so that my application changes to whatever version I pass to it even if I'm reverting to an older version than what's currently there because the version to be updated to will always be greater than 0.0.0.

I know that the client.wyc file contains some important rollback information if there is an error. Do you see any other possible downsides?
LCIII
 

Re: Downgrade Later

Postby tziaoni » March 29th, 2019, 4:37 am

LCIII wrote:
>
> This changes the client.wyc to version 0.0.0 just before I check for updates so that
> my application changes to whatever version I pass to it even if I'm reverting to
> an older version than what's currently there because the version to be updated to
> will always be greater than 0.0.0.
>
> Do you see any other possible downsides?

This isn't a real downgrade.

Assume version 0.0.0 is a new install.
If version 3.5.0 deploy some newer file that were not presents in any early version, when you "downgrade" to a previous version (2.0.0, for example) these files still leave in the application directory: in some case this scenario can have side effect.
tziaoni
 
Posts: 31
Joined: November 11th, 2015, 3:28 am

Re: Downgrade Later

Postby LCIII » March 29th, 2019, 11:14 am

tziaoni wrote:
> If version 3.5.0 deploy some newer file that were not presents in any early version, when you "downgrade" to a previous version (2.0.0, for example) these files still leave in the application directory: in some case this scenario can have side effect.

I could resolve this by running /uninstall first, right? That would clear out all files to begin with.
LCIII
 

Re: Downgrade Later

Postby Wyatt » March 29th, 2019, 11:35 am

Yes and no. Honestly, don't do that.

If a customer wants to use an old version, have them uninstall your app and use an old version.

If you have a bug in your app either fix it and release a new version. Or, if you don't have the time and resources, then create a new version in wyBuild and put old binaries in that new version.


Both cases where a customer would ever need to use an old version are already covered in those cases.
User avatar
Wyatt
Site Admin
 
Posts: 5865
Joined: July 11th, 2007, 10:30 pm
Location: New Hampshire


Return to wyBuild, wyUpdate, & AutomaticUpdater Support