Burn (WiX bootstrapper) does not uninstall MSI package

折月煮酒 提交于 2019-12-22 09:39:24

问题


I have a Burn bundle with this chain:

<Chain>
  <PackageGroupRef Id="NetFx40Web"/>
  <MsiPackage SourceFile="c:\\My\\Path\\MyMsi.msi"
        Id="MyMsi" DisplayName="MyMsi" DisplayInternalUI="yes" Vital="yes">
    <MsiProperty Name="INSTALLLOCATION" Value="[InstallFolder]" />
  </MsiPackage>
</Chain>

Both .NET framework and my MSI files are installed correctly. But the MSI package is not uninstalled during uninstall procedure (both after clicking on the bootstrapper EXE or from Programs And Features). Is there some way how to force uninstalling the MSI package?


回答1:


Burn will create a log file with detailed information about the change state of each package in %TEMP%. Take a look at the section called "Plan" and you will see lines for each package in your Bundle. Other messages in the log file will point out if the MSI is still reference counted by another Bundle or if the MSI on the machine is newer than the one the Bundle carries (so it won't uninstall it).




回答2:


I experienced the same problem of an MSI not uninstalling when removing the bundle and the reason turned out to be quite simple.

The MSI was created in the same Visual Studio solution and it was set as a dependency of the bundle project. Every time the bundle was created, the MSI was created first.

The root cause of the uninstall not happening was the product key of the MSI being set to "*" and thus be changed every time it was created. This somehow prevented the removal. When set to a fixed GUID, the uninstall was successful.

Edit: Turns out, I did something special. I created a German and an English version (called light.exe twice) and (with some external scripts) merged them together into one MSI. So, the German version had a different product ID as the English one. Uninstall worked properly either in German or English Windows, depending on which one light.exe was called first.



来源:https://stackoverflow.com/questions/15410364/burn-wix-bootstrapper-does-not-uninstall-msi-package

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!