OPC redistributable 107 has the same package code as 105|Classic OPC: DA, A&E, HDA, XML-DA, etc.|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
OPC redistributable 107 has the same package code as 105
Avatar
Ken Hagan
Member
Members
Forum Posts: 3
Member Since:
04/30/2014
sp_UserOfflineSmall Offline
1
10/11/2019 - 03:54
sp_Permalink sp_Print

The MSI for the 107 release has a package code of {725FFCF9-5D38-4249-8697-9BDB415E6B00}.

This is the same as the package code for the 105 release, which means that Windows Installer cannot distinguish between the two versions. If you have 105 on a machine and you try to install 107, you are told that "Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel.".

In our case, we were running the MSI in silent mode as part of a larger installer, so we didn't see the message. Apparently our upgrade use-case has been leaving 105 on the system instead of upgrading it to 107. Fortunately, this is a relatively benign failure mode, but it is still wrong. I think we need a 108 with a unique package code.

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
10/12/2019 - 05:41
sp_Permalink sp_Print

Do you have links to specific documentation that provides guidelines on what this code should be?

There were major problems with 106 because the component codes changed. 107 fixed those issues.

Messing with it again would risk re-creating those problems.

Avatar
Zbynek Zahradnik
Member
Members
Forum Posts: 62
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
3
10/12/2019 - 05:54
sp_Permalink sp_Print

From https://docs.microsoft.com/en-.....kage-codes : "Nonidentical .msi files should not have the same package code."

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
12/18/2019 - 01:32
sp_Permalink sp_Print

The GUID quoted in the first post is the PRODUCT code which is not the same as the PACKAGE code.

When I inspect the MSIs produced by the build system the PACKAGE code is changed automatically (as required).

So I need more explanation is needed before this issue can be fixed.

Avatar
Ken Hagan
Member
Members
Forum Posts: 3
Member Since:
04/30/2014
sp_UserOfflineSmall Offline
5
12/19/2019 - 09:12
sp_Permalink sp_Print

You are correct and I have mis-diagnosed my problem. Sorry for the confusion.

Sadly, the problem as described in my second paragraph is real enough. (I've just reproduced it on a clean machine.)

Some searching suggests that in fact both the product and package codes have to be unique to avoid this message. (The GUID that truly identifies the product is, perversely in my view, called the upgrade code.) This is noted, for example, at https://blogs.msdn.microsoft.c.....-used-for/ and although that isn't an authoritative reference (and is actively contradicted by, say, https://docs.microsoft.com/en-.....oduct-code) it nevertheless appears to be necessary to change the product code if you want updates to actually work.

Avatar
Ken Hagan
Member
Members
Forum Posts: 3
Member Since:
04/30/2014
sp_UserOfflineSmall Offline
6
12/20/2019 - 04:26
sp_Permalink sp_Print

I think I have a better understanding now. I have been using Orca.exe (https://docs.microsoft.com/en-.....i/orca-exe) to examine various MSI files.

It turns out that merely changing the product isn't enough. I used Orca to give the OPC 3.0.107 package a new ProductId and although it installed, it installed alongside the 105.1 package. (I dare say the 105 files got overwritten but Windows believes they are both still present, which is clearly untrue.)

Looking at pairs of packages from other vendors that do upgrade correctly, I see that they generally have two rows in the Upgrade table. For example:

    {upgradeguid} vmin=3.0.10700 attr=258 action=NEWERVERSIONDETECTED
    {upgradeguid} vmax=3.0.10700 attr=1 action=OLDERVERSIONDETECTED

In WiX, these two rows are created with:

    <Upgrade Id="$(var.UpgradeCode)">
        <!-- Detect any newer version of this product -->
        <UpgradeVersion Minimum="$(var.Version)"
            IncludeMinimum="yes"
            OnlyDetect="yes"
            Language="1033"
            Property="NEWERVERSIONDETECTED"/>

        <!-- Detect and remove any older version of this product -->
        <UpgradeVersion Maximum="$(var.Version)"
            IncludeMaximum="no"
            OnlyDetect="no"
            Language="1033"
            Property="OLDERVERSIONDETECTED"/>
    </Upgrade>

The additional row detects an existing older version and because it doesn't have bit 8 set in its attributes it will cause that older version to be removed.

By itself, however, this extra row is not enough either. Windows Installer apparently distinguishes three kinds of upgrades: small, minor and major (https://docs.microsoft.com/en-.....d-upgrades). Only major upgrades use the upgrade table (https://docs.microsoft.com/en-.....r-upgrades) and major upgrades are ones where the product code is different. So I used Orca to change the Product code and also add the extra row in the upgrade table and this removed 105 and installed 107.

I hope my experiments (and links) are helpful and thanks for the time you've spent on this.

Avatar
Randy Armstrong
Admin
Forum Posts: 1451
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
7
12/20/2019 - 23:11
sp_Permalink sp_Print

This issue should be fixed in the 108 that was posted today.

It will be RC until Jan 15th to give people a chance to test and report issues.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 26
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1351
Posts: 4579