How to install two instances of an Excel Add-In

767 Views Asked by At

We have written a .NET add-in for MS Excel 2010. it is working fine, and we are using the MS deployment package to create an MSI which installs the add-in just fine.

Problem is that sometimes we need to install two versions of the add-in. Perhaps one is todays version, and one is the next version being tested.

What all would I need to update and where to allow the installation of the add-in mroe than once, on the same machine?

To begin with, tried changing the GUIDAttribute, of both the versions of the Add-in project:

<GuidAttribute("75AC751D-AB16-4E37-8940-XXXXXXXXX"), ProgIdAttribute("MyAddin.connect")>

With that change, i think i would need to change the productcode,packagecode and upgradecode in the setup.

Is my understanding correct that if I need to install add-on of my two environments (UAT, Prod) on the same machine, then my productcode, packagecode and upgradecode need to be all unique.

In case later, the user get a new version of the prod add-in, then that add-in should have the same upgradecode, and packagecode, but different productcode only (specific

Can i keep the same ProgIDAttribute for both UAT and Prod in this scenario?

1

There are 1 best solutions below

2
On BEST ANSWER

Correct, you should change all 5 of them (and this is enough). The ProgIDAttribute and GuidAttribute are used to register the addin for the Excel (as name of a key in registery; therefore they both must be changed)

The PackageCode, UpgradeCode, and ProductCode will allow you to install two packages on the same computer. You cannot keep package code (because ALL packages at all should have different package codes). You can't keep product code, because if you do then the second package will reject to install saying you have another version of the same product installed.

So, in the addin project:

  • ProgID
  • Guid (i.e. ClassID)

In the installer project

  • ProductCode
  • PackageCode
  • UpgradeCode

If user gets a new build, to allow upgrade, you should change ProductVersion, ProductCode, and PackageCode, but keep UpgradeCode in the installer project (old installation is identified by the UpgradeCode).