3

I am currently creating a setup for our "AwesomeApp" which I'm going to refer to as "the MSI" in the following. The problem I am hitting here is:

My MSI has its own UpgradeCode and version, and when I raise it and run the MSI, then the old version is removed just the way it should be. (I am only doing major upgrades for now) However, when I run the bootstrapper (and of course I DID raise the version number of the bootstrapper as well and it has its own UpgradeCode that never changes) then I get two installs and two entries in ARP: One for the old, and one for the new version of the MSI

What the heck am I doing wrong? This is freakin me out.

Here is the msi xml:

<?xml version="1.0" encoding="UTF-8"?>
  <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

  <?define Source = "..\" ?>
  <?define Binaries = "..\AwesomeApp\bin\Release" ?>
  <?define AppName = "AwesomeApp" ?>
  <?define AppDataFolderName = "AwesomeApp" ?>
  <?define version = "0.6.0.0" ?>
  <?define upgradeCode = "801e999b-8edc-47a4-9793-78273739aa7d"?>

  <Product Id="*" Name="AwesomeApp" Language="1033"  Version="$(var.version)" Manufacturer="AwesomeCorp" 
           UpgradeCode="$(var.upgradeCode)">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
        <MediaTemplate EmbedCab="yes" />

    <MajorUpgrade AllowDowngrades="no" AllowSameVersionUpgrades="no" DowngradeErrorMessage="A newer version of this product was found." />

    <Feature Id="ProductFeature" Title="$(var.AppName)" Level="1">
            <ComponentGroupRef Id="ProductComponents" />
        </Feature>

    <Icon Id="my.ico" SourceFile="my.ico" />

    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
    <UIRef Id="WixUI_InstallDir" />

    </Product>

    <!-- Fragment stuff omitted for clarity -->
</Wix>

And here the bootstrapper xml:

        <Chain>
      <!--<PackageGroupRef Id="NetFx40Web" />

      <RollbackBoundary />-->

      <!-- referencing other projects and using variables see: http://wixtoolset.org/documentation/manual/v3/votive/votive_project_references.html-->
      <MsiPackage Id="Setup"
                  Compressed="yes"
                  SourceFile="$(var.AwesomeSetup.TargetPath)"
                  Vital="yes">
        <MsiProperty Name="INSTALLFOLDER" Value="[INSTALLDIR]" />
        <!--<MsiProperty Name="VERSION" Value="$(var.version)" />-->
      </MsiPackage>
        </Chain>
    </Bundle>
</Wix>

And here the log:

[0D70:1560][2013-12-24T08:45:56]i001: Burn v3.8.1128.0, Windows v6.2 (Build 9200: Service Pack 0), path: C:\Users\Alex\Downloads\AwesomeSetup.exe, cmdline: '/log MyLogFile.log'
[0D70:1560][2013-12-24T08:45:56]i000: Initializing string variable 'INSTALLDIR' to value '"[ProgramFilesFolder]AwesomeCorp\AwesomeApp"'
[0D70:1560][2013-12-24T08:45:57]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\Alex\Downloads\MyLogFile.log'
[0D70:1560][2013-12-24T08:45:57]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Users\Alex\Downloads\AwesomeSetup.exe'
[0D70:1560][2013-12-24T08:45:57]i000: Setting string variable 'WixBundleName' to value 'AwsesomeApp'
[0D70:1560][2013-12-24T08:45:57]i000: Loading managed bootstrapper application.
[0D70:1560][2013-12-24T08:45:57]i000: Creating BA thread to run asynchronously.
[0D70:1560][2013-12-24T08:45:57]i100: Detect begin, 2 packages
[0D70:1844][2013-12-24T08:45:57]i000: Parsing command line arguments
 System.String[].
[0D70:1844][2013-12-24T08:45:57]i000: Creating UI
[0D70:1560][2013-12-24T08:45:57]i000: Setting string variable 'NETFRAMEWORK40' to value '1'
[0D70:1560][2013-12-24T08:45:57]i102: Detected related bundle: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, type: Upgrade, scope: PerMachine, version: 0.5.0.0, operation: MajorUpgrade
[0D70:1560][2013-12-24T08:45:57]i052: Condition 'NETFRAMEWORK40' evaluates to true.
[0D70:1560][2013-12-24T08:45:57]i101: Detected package: NetFx40Web, state: Present, cached: Complete
[0D70:1560][2013-12-24T08:45:57]i101: Detected package: Setup, state: Absent, cached: None
[0D70:1560][2013-12-24T08:45:57]i199: Detect complete, result: 0x0
[0D70:1844][2013-12-24T08:45:57]i000: Pagestamachine: setting WelcomePage
[0D70:1844][2013-12-24T08:45:57]i000: Getting variable 'INSTALLDIR' from the bundle.
[0D70:1844][2013-12-24T08:45:57]i000: Writing variable 'INSTALLDIR' with the value 'C:\Program Files (x86)\AwesomeCorp\AwesomeApp' to the bundle.
[0D70:1844][2013-12-24T08:45:57]i000: Setting string variable 'INSTALLDIR' to value 'C:\Program Files (x86)\AwesomeCorp\AwesomeApp'
[0D70:1844][2013-12-24T08:45:57]i000: Getting variable 'INSTALLDIR' from the bundle.
[0D70:1560][2013-12-24T08:46:05]i200: Plan begin, 2 packages, action: Install
[0D70:1844][2013-12-24T08:46:05]i000: Pagestamachine: setting ProgressPage
[0D70:1560][2013-12-24T08:46:05]w321: Skipping dependency registration on package with no dependency providers: NetFx40Web
[0D70:1560][2013-12-24T08:46:05]i000: Setting string variable 'WixBundleRollbackLog_Setup' to value 'C:\Users\Alex\Downloads\MyLogFile_0_Setup_rollback.log'
[0D70:1560][2013-12-24T08:46:05]i000: Setting string variable 'WixBundleLog_Setup' to value 'C:\Users\Alex\Downloads\MyLogFile_0_Setup.log'
[0D70:1560][2013-12-24T08:46:05]i201: Planned package: NetFx40Web, state: Present, default requested: Present, ba requested: Present, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[0D70:1560][2013-12-24T08:46:05]i201: Planned package: Setup, state: Absent, default requested: Present, ba requested: Present, execute: Install, rollback: Uninstall, cache: Yes, uncache: No, dependency: Register
[0D70:1560][2013-12-24T08:46:05]i207: Planned related bundle: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, type: Upgrade, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, dependency: None
[0D70:1560][2013-12-24T08:46:05]i299: Plan complete, result: 0x0
[0D70:1560][2013-12-24T08:46:05]i300: Apply begin
[0D70:1844][2013-12-24T08:46:05]i000: Pagestamachine: setting ProgressPage
[183C:26FC][2013-12-24T08:46:07]i360: Creating a system restore point.
[183C:26FC][2013-12-24T08:46:07]i361: Created a system restore point.
[183C:26FC][2013-12-24T08:46:07]i000: Caching bundle from: 'C:\Users\Alex\AppData\Local\Temp\{3c4fa1ca-8f44-4d77-a9e6-4a42cdd61fb5}\.be\AwesomeSetup.exe' to: 'C:\ProgramData\Package Cache\{3c4fa1ca-8f44-4d77-a9e6-4a42cdd61fb5}\AwesomeSetup.exe'
[183C:26FC][2013-12-24T08:46:07]i320: Registering bundle dependency provider: {3c4fa1ca-8f44-4d77-a9e6-4a42cdd61fb5}, version: 0.6.0.0
[183C:151C][2013-12-24T08:46:07]i305: Verified acquired payload: Setup at path: C:\ProgramData\Package Cache\.unverified\Setup, moving to: C:\ProgramData\Package Cache\{331D731B-5DAF-4EEC-A89B-C64786EFD96F}v0.6.0.0\AwesomeSetup.msi.
[183C:26FC][2013-12-24T08:46:07]i323: Registering package dependency provider: {331D731B-5DAF-4EEC-A89B-C64786EFD96F}, version: 0.6.0.0, package: Setup
[183C:26FC][2013-12-24T08:46:07]i301: Applying execute package: Setup, action: Install, path: C:\ProgramData\Package Cache\{331D731B-5DAF-4EEC-A89B-C64786EFD96F}v0.6.0.0\AwesomeSetup.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" INSTALLFOLDER="C:\Program Files (x86)\AwesomeCorp/AwesomeApp"'
[0D70:1560][2013-12-24T08:46:10]i319: Applied execute package: Setup, result: 0x0, restart: None
[183C:26FC][2013-12-24T08:46:10]i325: Registering dependency: {3c4fa1ca-8f44-4d77-a9e6-4a42cdd61fb5} on package provider: {331D731B-5DAF-4EEC-A89B-C64786EFD96F}, package: Setup
[183C:26FC][2013-12-24T08:46:10]i301: Applying execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, action: Uninstall, path: C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe, arguments: '"C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe" -uninstall -quiet -burn.related.upgrade'
[0D70:1560][2013-12-24T08:46:11]i319: Applied execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, result: 0x0, restart: None
[0D70:1560][2013-12-24T08:46:11]i399: Apply complete, result: 0x0, restart: None, ba requested restart:  No
[0D70:1844][2013-12-24T08:46:11]i000: Pagestamachine: setting FinishPage

As far as I understand the log, the existing msi is not detected and therefore a clean install is performed, thus the two entries in the ARP. But how can that be?

quetzalcoatl
  • 32,194
  • 8
  • 68
  • 107
Alexander Marek
  • 479
  • 1
  • 7
  • 22

2 Answers2

1

The lines from the log:

[183C:26FC][2013-12-24T08:46:10]i301: Applying execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, action: Uninstall, path: C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe, arguments: '"C:\ProgramData\Package Cache\{3e80e7b7-660e-4529-b7fa-414ddc2954f5}\AwesomeSetup.exe" -uninstall -quiet -burn.related.upgrade'
[0D70:1560][2013-12-24T08:46:11]i319: Applied execute package: {3e80e7b7-660e-4529-b7fa-414ddc2954f5}, result: 0x0, restart: None

show that the previous version of the bundle is being uninstalled.

It was successful so the ARP entry should be removed. Look for the Burn log for that invocation.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
  • Am I missing something? I thought these WERE the burn logs... At least I started the burn installer using "AwesomeSetup.exe /log MyLogFile.log" (see first answer in http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Burn-log-location-td7586601.html) I searched through the docs (maybe not good enough?) but could not find any infomration about where burn stores its log files so I thought this was it.... :| – Alexander Marek Dec 26 '13 at 07:08
  • 2
    When the older bundle is uninstalled, it creates its own set of logs. Since the newer version reports that the older version was successful, you need the logs from the older version to figure out why it didn't remove the older ARP entry. – Bob Arnson Dec 26 '13 at 18:52
  • seems reasonable, but I cannot figure out where these logs should be. Could you please send me a link of a how-to or something? Sorry for my annoying incompetence... :| – Alexander Marek Dec 27 '13 at 08:20
  • 1
    I would assume they'd be next to the "main" log you pasted from. If not there, Burn puts logs by default in %TMP% (or %TMP%\.. if you're running on a Terminal Services machine). – Bob Arnson Dec 27 '13 at 18:37
  • Thanks to your hint, I found the log and it shows that the old version of "AwesomeApp" is removed - at least its folder and icons and everything. But unfortunately the entry of the bundle in the ARP (? - i mean the "Programs and Features" list) is not removed and I need to fix that. Any ideas? – Alexander Marek Jan 05 '14 at 15:56
0

Cudos to Bob for finding out the answer. There really seems to be a bug in the managed BA I use, which is the Laika42 Themed Bootstrapper Light.

I created a test-project to verify that behavior and uploaded it to my skydrive

What I did:

  • Created a simple console application "AwesomeApp" to have something to install.
  • Created a setup project for it
  • Created a WIX Bootstrapper project for it
  • Created a Lakia42 Bootstrapper project for it

  • Now when I install the normal bootstrapper, then raise bootstrapper version and setup version and install it again, the old app along with its ARP entry is removed correctly.

  • When I install the Laika bootstrapper, then raise its version and the setups wersion and install it again, the old app is removed*, but the old ARP entry stays in the list!*

Very annoying bug that killed several hours of my time... Thank you so much Bob!

UPDATE: I just received a mail with the patched managed BA dll from Laika42. Now it works like a charm. Hopefully they'll publish it soon. 'till then, be careful using the Laika42 Bootstrapper Light.

@Bob: I guess I owe you a cold beer, right? Gimme a call when you ever come to Vienna ;-)

quetzalcoatl
  • 32,194
  • 8
  • 68
  • 107
Alexander Marek
  • 479
  • 1
  • 7
  • 22
  • For the sake of completeness: [Laika42 aka One Click Bootstrapper](http://www.xeam-solutions.com/products/free-tools/wix-toolset-extension.html) – CodeFox Aug 17 '14 at 13:35
  • But what where the changes?, I'm experiencing the same in our bundles, it seems like the bundle is also seeing the 4th digit as versionchanges, whereas msi do use only three? – neslekkiM Sep 11 '14 at 08:50
  • What do you mean by "what where the changes"? It was simply a bug in the Laika42 bootstrapper that they fixed, after I reported it. – Alexander Marek Sep 11 '14 at 11:01