How does instance conversion of a Windows Installer interact with updates?

I created an installation package (via WIX) that takes advantage of instance conversion, which allows you to install it several times on the same computer. Without thinking about it, I also added support for major updates (as I did many times before).

Today the new version of the product was installed for the first time, and the behavior was not quite what I expected: despite the fact that the installation was aimed at a new instance, it seems that all other instances (all in the older version) were deleted.

Looking back, this was not particularly surprising because all instances use the same update code. According to the documentation for the FindRelatedProducts action, this and the version are the only criteria for determining which products should be targeted for removal.

How can I create this installation package so that when installing a new version, only the target instance is updated and the other instances are left alone?

I suspect the answer may be that I should completely remove the โ€œmain updateโ€ function, but I have seen several installation examples with multiple instances that use it, so I'm not sure. In addition, it occurs to me that I am probably not processing the product code correctly because it needs to be updated using the version number, but the conversion transforms use a fixed product code. For some reason I do not think that this is the problem, but I thought that I should mention this just in case.

+4
source share
1 answer

I once wrote a bootloader using InstallScript to support a similar story. This was before InstallShield included this functionality and was based on my work, which I shared with them.

Basically, my code did a great job reflecting the conversion of the instance from the MSI repository, and then requested the MSI API to understand which instances were already installed, and whether the current MSI shows the service user interface (the same ProductCode and the same PackageCode), or an update a major update (another ProductCode) or a minor update (the same ProductCode that is different from PackageCode).

You can read more about this:

Multiple instances of MSI and InstallShield 12

This explains how it works in IS2009 + with screenshots of the bootstrapper user interface.

InstallShield 2009 Beta Part I (Multiple)

+3
source

Source: https://habr.com/ru/post/1342669/


All Articles