Blog Stats
  • Posts - 21
  • Articles - 0
  • Comments - 11
  • Trackbacks - 17

 

Upgrading Strategy Using WiX

As described in the WiX (Windows Installer XML) tutorial, upgrades can be categorized into three following categories:

  • Small Updates:  Very small changes to existing files.  Version number stays the same.
  • Minor Ugrades: Small changes, but no new files are added or removed.  Change the the version number (most likely, change the minor or the build).
  • Major Ugrades: New files are added or removed.  Definitely change the version number (major, minor or build).

In my opinion, the first two options are not as useful for a typical upgrade when new features are added.  One of the biggest restrictions for the first two options is that you can not add or remove new files.  This is especially true when the creation of MSI is automated.  On top of that, you cannot setup upgrade conditions.  For example, an upgrade from 1.0.0 to 1.0.1 if 1.0.0 is installed.  This feature only works for major upgrades.  Normally, the user can click on the MSI to install the software. If you do a small update or minor upgrades you cannot simply just click on the MSI.  The only way to invoke the upgrade mode is to pass command line arguments to the MSI.

I prefer to always do the the major upgrade to have maximum flexibility and avoid all the problems described above.  Of course there are down sides to this approach as well.

  • All the files must be deployed every time in order to do an upgrade.
  • By MSI definition, major versions can live side by side with an older version.

The first one is not a big deal if your upgrade contains significant change because chances are MSI will force you to do a major upgrade anyway.  The second problem is a little bit more annoying because it might be undesireable to have many old versions lingering around.  One way to solve this problem is to transparently uninstall the old version before the new version.  This works fine except it probably will wipe out any user defined settings if they are stored in a file that was deployed by the original MSI during an uninstall.

Overall, I still prefer the major updates strategy over the other two.


Feedback

No comments posted yet.


Post a comment





 

Please add 6 and 1 and type the answer here:

 

 

Copyright © Aaron Feng