Nick B
Nick B

Reputation: 161

How to detect that Wix bundle is being uninstalled?

I have a Wix bootstrapper bundle that installs a couple of msi packages.I want to delete some registry values when this bundle is being uninstalled. The problem is that this values should be deleted only when whole bundle is uninstalled (not one of the msi packages). I tried to use WixBundleAction Wix variable to detect this case and pass it as msiProperty to my packages, but it allways evaluates to 0

<MsiPackage Id="Pac" SourceFile="$(var.so)" Compressed="yes" Vital="yes">
        <MsiProperty Name="REMOVE_REG" Value="[WixBundleAction]"/>
      </MsiPackage>

Is there any proper way to detect when the bundle is uninstalling?

Upvotes: 0

Views: 1133

Answers (1)

Sean Hall
Sean Hall

Reputation: 7878

The direct answer to your question is that it was a bug that it was always 0, it should be fixed in the latest build of v3.10 and v4.0.

The real answer is that you should be doing all registry operations inside an MSI, not the bootstrapper. Let Windows Installer keep track of ref counting, rollback, etc.

Upvotes: 1

Related Questions