4
votes

I have made a burn bundle which encapsulates 2 msi (msi1 , msi2) . In the UI I use checkboxes to ask the user to select which MSI to install.

Now if user selects one of the msi to install, installation goes fine. But during Uninstall action, the burn log file says :

[][:15]: Detected package: Netfx4Full, state: Present, cached: None

[][:15]: Detected package: DummyInstallationPackageId3, state: **Absent**, cached: None

[][:15]: Detected package: msi2.msi, state: **Present**, cached: Complete

[][:15]: Detect complete, result: 0x0
[][:16]: Plan 3 packages, action: Uninstall
[][:16]: Will not uninstall package: msi2.msi,   found dependents: 1
[][:16]: Found dependent: {08e74372-83f2-4594-833b-e924b418b360}, name: My Test Application

In the install scenario, I chose to install msi2 and NOT msi1.

My bundle code looks like:

<Bundle Name="My Test Application" Version="1.0.0.0" Manufacturer="Bryan" UpgradeCode="CC2A383C-751A-43B8-90BF-A250F7BC2863">

<Chain>

<PackageGroupRef Id='Netfx4Full' />

<MsiPackage  Id="DummyInstallationPackageId3"
SourceFile="msi1.msi"
ForcePerMachine="yes"
InstallCondition="var1 = 1"
>
</MsiPackage>

<MsiPackage 
SourceFile="msi2.msi"
Vital="yes" Cache="yes"  Visible="no"
ForcePerMachine="yes"
InstallCondition="var2 = 2"
>
</MsiPackage>
</Chain>

My OnDetectPackageComplete() looks like:

 private void OnDetectPackageComplete(object sender, DetectPackageCompleteEventArgs e)
  {
    if (e.PackageId == "DummyInstallationPackageId3" )
    {
      if (e.State == PackageState.Absent)
        InstallEnabled = true;

      else if (e.State == PackageState.Present)
        UninstallEnabled = true;
    }
  }

What should I do so that the burn bundle is freely able to uninstall the msi which the user selected at the time of install. Besides, If I select both msi to install, then uninstall is working fine.

IMO, there is some problem b/w the relation of bundle and the 2 msi. Please help me as I am stuck with this problem.

1

1 Answers

5
votes

Your registry could be messed up from a lot of trial and error with creating your first Burn bootstrapper. I would suggest trying the following:

  1. Search the registry for the "dependents" (ex: {08e74372-83f2-4594-833b-e924b418b360}) and delete those keys
  2. Uninstall the application (should succeed)
  3. Search the registry for the product code of the other .msi that you had installed before. Verify it is not in the registry. If it does exist, delete those keys.
  4. Try reinstalling and see if you can uninstall ok.