Since I wasn't a part of my company when our build process was designed and implemented (and has been successful for quite a few years now), I found out that there were things that were being done that may be looked at as 'hacks' to MSI 'purists'. However, in order to get a workable installer with Visual Studio 2012, I've been doing the best I can to mimic what was being done with the .vdproj
files in Visual Studio 2010. Of the many snags I've hit, this one seems to be the last one that I can't resolve.
As part of our build process with Visual Studio 2010, we built our code and created a Framework MSI on one VM. Then we took that Framework MSI and installed it on a different VM. After the framework had been installed, we built our product code and created a Product MSI off of it. This created a Product dependence on our Framework. What this meant was that when installing on a client machine, the bootstrapper needed to install the Framework first followed by the Product. On uninstall our documentation stated to either have it handled through ARP or by command line 'msiexec /x {Product.msi/@ProductCode}
' and then the 'msiexec /x {Framework.msi/@ProductCode}
'.
At the time, management determined that the ProductCode
would be the easiest way for other product teams to determine if our product had been installed on a machine. This lead them to the decision that they needed to keep a static ProductCode
for both the Framework and the Product.
In order to handle upgrades, they had to create a ProductTool.exe
that was nothing more than the msiexec wrapped in an executable that took a /ProductCode={@ProductCode}
argument.
As part of our bootstrapper, they called:
- Install prerequisites (Windows Installer 4.5, .NET 3.5 SP1, SQL Server 2008 R2 Express, Sync 2.1)
ProductTool.exe
(Product.msi
-- to uninstall the Product.msi)ProductTool.exe
(Framework.msi
-- to uninstall the Framework.msi)- Install
Framework.msi
- Install
Product.msi
However, I didn't discover until just recently that the Burn bootstrapper does not allow REINSTALLMODE=amus
. In the install logs, it says that it changes it to REINSTALLMODE=vomus
. Apparently in order to get that aforementioned process to work on upgrades, they had to set REINSTALLMODE=amus
.
UPDATE: I finally got to talk to the original developer of the installer and found out that REINSTALLMODE=amus
was used intentionally to revert all of the versioned files (assemblies, DLL files, etc.) and non-versioned files (.config, SQL script, etc.) as a risk minimization and robustness/"self-healing" strategy.
Having said all of that, is it even possible with a standard burn bootstrap application (BA) to set REINSTALLMODE=amus
so that I can get the upgrades working? The MSI files have the Property's set, but Burn seems to override it.
No, this is not supported by the Burn engine today. Burn controls the
REINSTALLMODE
very carefully to correctly handle upgrades and repairs. Usinga
inREINSTALLMODE
is far from a best practice and thus is not supported. Also, it isn't clear whya
is necessary in the scenario you described.