4

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.

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
007coder
  • 161
  • 1
  • 13

1 Answers1

5

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.
BryanJ
  • 8,485
  • 1
  • 42
  • 61
  • I agree with your work around, but the problem is with my modelView code. Say I installed just msi2.msi which went fine. Now to uninstall, when I proceeded; the UI which I get has "Install" button active. Since "DummyInstallationPackageId3" (msi1.msi) is not installed, hence it gives "Install" button active. Is there some way to correct this behavior ? I mostly followed the example given at your blog. – 007coder Oct 16 '12 at 22:58
  • In that case you could have a property for each package, something like InstallEnabledPackageId3 and InstallEnabledPackageId2. Then have the install button bound to InstallEnabled and have it defined like public bool InstallEnabled { get { return (InstallEnabledPackageId3 && InstallEnabled PackageId2) ? true : false; } } – BryanJ Oct 17 '12 at 13:28
  • Having 2 booleans helped solving the issue. I was hoping is problem is more complex wrt 'dependency'; but even individual install/uninstall of msi2.msi is going fine. Thnx. Though, i was wondering why would Burn register "bundle name" as dependency for the individual msi s ? I saw that info in the burn log. – 007coder Oct 17 '12 at 21:53