Wix Burn issue: Uninstall fails saying "Found dependent"
Posted
by
vivek chaurasiya
on Stack Overflow
See other posts from Stack Overflow
or by vivek chaurasiya
Published on 2012-10-10T21:16:50Z
Indexed on
2012/10/16
23:01 UTC
Read the original article
Hit count: 623
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.
© Stack Overflow or respective owner