2

Why do I get two AddRemoveProgram entries if I install the setup.msi first, and then install the bundle.exe containing the setup.msi. Here is the Chain in my bundle.

<Chain>
  <PackageGroupRef Id="NetFx40Redist"/>
  <MsiPackage SourceFile="$(var.MsiProject.TargetDir)Setup.msi" />
</Chain>

The setup.msi has a hard-coded ProductCode that was extracted from the bundle.exe using dark -x. Shouldn't bundle.exe detect the already installed setup.msi and skip the installation?

Wolf
  • 9,679
  • 7
  • 62
  • 108
Peter
  • 1,048
  • 10
  • 23

1 Answers1

4

The first entry is for the MSI; the second for the bundle. An MsiPackage element has a Visible attribute that controls whether Burn causes the package to have its own ARP entry visible or not. The default is "no" so in some cases, but not yours, it would result in the two entries.

Yes, Burn does not reinstall packages that are already installed.

Burn is a package manager so it'll always install/uninstall and register/unregister itself. When multiple bundles contain the same packages, Burn figures out which to leave when uninstalling a bundle. Of course, some, like NetFx40Redist, are marked as permanent so the bundle will never uninstall them.

Again, if you'd rather not see an ARP entry for the MSI, be sure to the MsiPackage/@Visible element isn't set to "yes".

Tom Blodget
  • 20,260
  • 3
  • 39
  • 72
  • Ahh, you are absolute right! How dumb was I totally not aware of this. Appreciates! – Peter Jan 22 '14 at 05:58
  • fyi, `@Visible="no"` is [the default](http://wixtoolset.org/documentation/manual/v3/xsd/wix/msipackage.html) – Sean Hall Jan 24 '14 at 02:20
  • @Hall72215 Thanks. Of course, it would have no effect if the MSI was already installed. So, prior installation by other means completely explains why the question asker sees it. – Tom Blodget Jan 24 '14 at 04:20
  • 1
    Yes, your core answer is right (`The first entry is for the MSI; the second for the bundle`). Some of your explanation is misleading though: unless the MSI installs itself as hidden when run alone, you will always see two entries when you install the MSI before the bundle (even when `@Visible="no"`). And with his original bundle, if he installed the bundle first then there would only be one entry. – Sean Hall Jan 24 '14 at 14:39