Updating multiple instances
Posted 11 May 2005 - 14:31
Posted 11 May 2005 - 15:02
You have distriubted versions
You now have version 2.1 (_D) and you want patch files to upgrade versions _A, _B, & _C to _D
First of all I'm assuming you know how to set up the patching process, and as a result have the uncompressed installs for versions _A, _B, _C, & _D
I know that you can have patches _AD, _BD, & _CD which would be a seperate patch generated for each prior version. This would of course generate the smallest patches and minimize cost if the patches would be transferred over the internet, however, you would have to maintain a seperate patch for each prior version to the latest (or to each prior version if you wanted to be able to go from any prior version to any version after that).
I think you can set up a patch to target multiple versions and just order the patch application so that it will try to patch as if it was _A first, then _B, then _C. This way the same patch should work for all three prior versions, but it would be larger.
As far as user friendly, you can have a patch condition in your ui sequence to show a start dialog for patching situations and controll what the user sees after that. Just condition on "PATCH"
If Windows Installer is installed correctly, the user should be able to click on the .msp file and launch the patch process (at least this has been the case on the systems that I have tested this on).
Edited by _nick_, 11 May 2005 - 15:03.
Posted 12 May 2005 - 07:35
Thank you for your help! The scenario is a little bit different than you described. User can have several instances and only one would be updated. It's not known beforehand, which instance will be updated and there are too many versions, which can be updated, so I can't make own patch to each version.
So is it possible to dynamically check installed instances and make, for example, a dialog with radio buttons and texts "version 1.0", "version 1.1", "version 1.1.1" and so on, where the user can select the instance to update?
Posted 13 May 2005 - 14:09
If this is the case, you could use the "RelatedProducts" property of the installer object to return a list of products that the patch can be applied to. Then you could simply ask the user to select the version to upgrade from a list and use the "ApplyPatch" method of the installer object to applythe patch to the correct product.
Posted 16 May 2005 - 09:53
BTW is there any method to install a new instance of product during the installation process?
I mean that you can apply a patch with ApplyPatch method during installation, so is there any similar methods to install a new instance? I didn't find any.
Posted 16 May 2005 - 19:42
You can use the "InstallProduct" method to install the product, and the "PATCH" property to apply the patch at the same time.
Posted 17 May 2005 - 12:42
Easiest way to do that is to make a .mst file which changes the product code and run .msi with .mst from command line. The situation I am aiming at is that I start installation from double-clicking .msi package and if install process determines previously installed instance, it will ask user to whether install a new instance or repair/uninstall previously installed instance.
It's important that there is no need to make a new .mst file to every new instance because product code should be modified in .msi file...