Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it necessary to use unique WIX product ID for all product versions if upgrade not supported

Tags:

windows

wix

We have a product that uses WIX installer and only our support team performs installation routines. The ONLY way that is used for upgrade application contains two steps:

  1. Delete ANY previous version of application that is installed. We have a list of all product GUIDs by which we can delete all possible versions (msiexec /x GUID)
  2. Install the latest one

Upgrade, repair or installation over old version scenarios will never be used for this product (this is impossible because deployment is performed by scripts).

Is it necessary to make product id unique for all new versions in case we do not use Upgrade functionality, or it is possible to keep the same product and upgrade ID?

like image 878
Jolly Roger Avatar asked Nov 04 '14 11:11

Jolly Roger


2 Answers

From the documentation of the ProductCode property: This ID must vary for different versions and languages. So typically you should just set Id="*" in the Product element, so that it is unique for each installer package that you generate.

I can't think of a reason why you would want this Id to stay the same for different versions of your installer; this will confuse windows installer, e.g. you might get the repair dialog when you try to install a newer package without uninstalling the previous one.

The upgrade code should only be relevant when you use MajorUpgrade, but it sounds like you aren't using that.

edit: OK, so you want to keep the product id the same to make it easier to uninstall with msiexec /x {GUID}.

An alternative is to let the installer itself record the product code GUID somewhere. E.g. by creating an uninstall shortcut. Or you could write the product Guid to a fixed location in the registry, and then you can write a script that reads that value to uninstall.

like image 126
Wim Coenen Avatar answered Nov 06 '22 21:11

Wim Coenen


Your two step process is exactly what a Major Upgrade does. However, you say that you don't support upgrades. This doesn't make sense to me.

A properly authored installer could be executed silently via script to automatically upgrade any previous version of your software to the current version.

like image 30
Christopher Painter Avatar answered Nov 06 '22 22:11

Christopher Painter