Version and UpgradeCode of Bundle vs Setup in WiX When Upgrading from VS Setup Project
Asked Answered
L

1

7

I am migrating some things from Visual Studio 2008 to 2012. One of my projects contains a Setup Project which is no longer supported in 2012. I decided to rebuild it in WiX 3.6. I have created a WiX setup project to setup my files and another WiX bundle project to bundle my prerequisites with the setup project.

Now, I would like to have this setup project work seamlessly with previous installations if possible. For example, I have machines which installed version 1.0 on their systems using the setup.exe created by VS setup project in VS2008. Now I have compiled version 2.0 using the setup.msi created by WiX bundle project in VS2012. When the version 2.0 msi is run, I would like it to recognize that an older version of the same setup is installed and preform an update on that (or reinstall).

So my issue is that each of the bundle and the setup project contains their own UpgradeCode and Version. Which one should receive the UpgradeCode of my version 1.0 setup? When I version now and in the future, do I version one or both of these?

Lorielorien answered 18/1, 2013 at 22:21 Comment(0)
L
5

I more or less figured it out through trying different things. When the bootstrapper installs, this is what is put into the Add/Remove programs menu. Therefore, I have figured that the upgrade code of the bootstrapper should match the one of my old package. Then the setup will immediately know that a previous version was installed and should be uninstalled before continuing. The upgrade code of the msi should then be another unique code. Then the versions of both the msi project and bootstrapper project should be updated upon each build.

Lorielorien answered 26/1, 2013 at 16:21 Comment(1)
When a bundle performs an upgrade, each internal package may upgrade itself if it supports upgrading. Therefore, you should be able to maintain the same upgrade code for your msi package, and give the bundle a new upgrade code. Your solution works for a bundle which contains a single msi, but breaks down once you need to package/upgrade multiple msis.Impale

© 2022 - 2024 — McMap. All rights reserved.