Reputation: 4406
When I try installing an upgrade built with WiX, I get the error "The specified account already exists" and yes, I have read Windows msi: error 1316: the specified account already exists
I'm confused about the role of the various GUIDs in the WiX project files.
Previously, I had released ver. 5.4.35 of my program; the Product.wxs
file created an MSI and contained the following directives:
<Product Id="4DF780D3-60EC-43D3-A537-8484FE03B793"
Version="5.4.35"
UpgradeCode="A2F60910-A7FC-4B96-9375-EFBED25CC826">
The Burner created an EXE from the MSI with the following Bundle.wxs
file:
<Bundle Version="5.4.35"
UpgradeCode="0694ce56-8095-450c-9859-881c0c9d56f7">
I published a new version 6.0.6, and changed nothing other than the version. The new Product.wxs
is:
<Product Id="4DF780D3-60EC-43D3-A537-8484FE03B793" Same
Version="6.0.6"
UpgradeCode="A2F60910-A7FC-4B96-9375-EFBED25CC826"> Same
and the Bundle.wxs
is:
<Bundle Version="6.0.6"
UpgradeCode="0694ce56-8095-450c-9859-881c0c9d56f7"> Same
Users are reporting that installing the new version on top of the old version fails, the "Repair" doesn't work. They have to completely uninstall the old version, and install the new one, which is inconvenient.
The installer does contain some custom actions. There are no component or other GUIDs.
My question: what should I change to insure that the upgrade works correctly and is error-free?
Upvotes: 2
Views: 955
Reputation: 20790
See if this helps:
The ProductCode is the guid that identifies that this product is installed on the system. You cannot install the same product twice (in the same context, strictly speaking, such as per machine). The product is already installed, by definition, so trying to reinstall it causes (usually) a maintenance mode repair action. Unless your custom actions have an appropriate condition they will run again - if there is a custom action that runs when its owning component is installed then it will run again when the component is reinstalled as part of a repair, so it will try to create the user again.
So a new ProductCode is required for a major upgrade because you now have a new complete install of the product that just happens to remove an older version of the product if there is one.
The UpgradeCode guid is a product line attribute. When you ship Product 2012, Product 2013, Product 2015 where each replaces the older one then they will use the same UpgradeCode precisely becaue this is used to search for those earlier products and upgrade them.
A major upgrade also requires the ProductVersion to be incremented in the first 3 digits, have a new PackageCode (usually automatic) and will upgrade only the same context (e.g. per machine will upgrade per machine but not per user install).
Also, the bundle codes are modeled on the MSI method but are not connected. The idea is that bundles have the same architecture - they need to detect current ones and upgrade older ones, so they use upgrade and product codes too,
In your case, you are trying to install the same ProductCode, which is not a good start to creating a major upgrade.
I think bundles produce verbose logs of the MSI activity, so they can be very helpful.
Upvotes: 3
Reputation: 1965
The Product.Id
is the identifier between different versions. It works more or less like this:
The solution is to change the Product.Id
for the new version. In my projects, I use Product Id="*"
, as in my case the version is updated every build.
Upvotes: 2