简体   繁体   中英

Uninstall MSI package when uninstalling from Bootstrapper

I have a Bootstrapper that will install an MSI package. But when uninstalling the Bootstrapper, it won't uninstall the MSI which was previously installed by Bootstrapper.

How can I uninstall the MSI package along with uninstalling the bootstrapper ? Following is what I do to install the MSI package in Bootstrapper. How to enhance this code to uninstall this MSI package at uninstall ?

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
    <Bundle Name="Name" Version="1.0.0.0" Manufacturer="MyCompany" UpgradeCode="00000000-0000-0000-0000-000000000000" DisableModify="yes" DisableRepair="yes" >

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
    <bal:WixStandardBootstrapperApplication
      LicenseUrl=""
      ThemeFile=".\Theme\RtfTheme.xml"
      LocalizationFile=".\Theme\RtfTheme.wxl"

      xmlns:bal="http://schemas.microsoft.com/wix/BalExtension" />
      <Payload SourceFile=".\Images\Logo.gif" />
    </BootstrapperApplicationRef>

        <Chain>
              <PackageGroupRef Id="MyMSI"/>
        </Chain>
    </Bundle>

  <Fragment>

    <PackageGroup Id="MyMSI">
      <MsiPackage Id="MyMSI"
                  DisplayName="My applicaton"
                  DisplayInternalUI="yes"
                  Compressed="no"
                  Visible="yes"
                  InstallSize="549"
                  Cache="yes"
                  Vital="yes"
                  Permanent="no"
                  SourceFile="$(var.MyAppllicationWIX_MSI.TargetPath)"/>
    </PackageGroup>
  </Fragment>
</Wix>

Probably your registry is not good, check the logs in %temp% folder section plan. The log file will point out if the MSI is still reference counted by another Bundle.

If you are running the tests on VM try to reset to latest checkpoint before running the test on this bundle.

Also sometime when the product id is * it happens.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM