title: Uninstalling bundle does not remove exe package
body: <p>I have a the following bundle.wxs.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
       xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
       xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"&gt;
  
    &lt;Bundle Name="&lt;%= @product_name %&gt;"
            Version="&lt;%= @short_version %&gt;"
            Copyright="&lt;%= @copyright %&gt;"
            UpgradeCode="..."
            DisableModify="yes"
            DisableRemove="no"
            IconSourceFile="&lt;%= @icon_path %&gt;"
            Manufacturer="&lt;%= @vendor %&gt;"&gt;
        &lt;Chain&gt;
          &lt;!-- Prerequisites as ExePackage or MsuPackage 
          ...
          --&gt;
  
          &lt;ExePackage DisplayName="&lt;%= @product_name %&gt;"
                      Name="&lt;%= @product_name_short %&gt;"
                      Cache="no"
                      PerMachine="no"
                      SourceFile="Releases/Setup.exe"
                      Permanent="no"
                      Compressed="yes"
                      Vital="yes"&gt;
            &lt;ExitCode Value="1638" Behavior="success"/&gt;
          &lt;/ExePackage&gt;
        &lt;/Chain&gt;
    &lt;/Bundle&gt;
  &lt;/Wix&gt;
  </code></pre>
  
  <p>All the prerequisites are machine-wide, the main installer is per user (it's a squirrel.windows installer).</p>
  
  <p>The name of the ExePackage element is identical to the name of the installer.</p>
  
  <p>When I uninstall the bundle, the main installer does not get invoked.</p>
  
  <p>I also tried adding a custom action to the end of the chain in order to explicitly uninstall the application.
  The technique is described here: <a href="https://stackoverflow.com/a/34111659/1151959">https://stackoverflow.com/a/34111659/1151959</a></p>
  
  <p>The custom action doesn't get called on uninstall either:</p>
  
  <pre><code>  &lt;ExePackage SourceFile=".\custom-action.cmd"
                InstallCommand="echo test &gt;c:\temp\install.txt"
                UninstallCommand="echo test &gt;c:\temp\uninstall.txt" /&gt;
  </code></pre>
  
  <p>I get the install.txt but not the uninstall.txt.</p>
  
  <p>See the uninstall log below (with sensitive data replaced):</p>
  
  <pre><code>[0450:1944][2017-10-06T11:54:50]i001: Burn v3.11.0.1701, Windows v10.0 (Build 15063: Service Pack 0), path: C:\Users\&lt;user&gt;\AppData\Local\Temp\{D9345F60-E59E-4038-9E58-C173AD02AAA3}\.cr\&lt;bundle&gt;.exe
  [0450:1944][2017-10-06T11:54:50]i009: Command Line: '-burn.clean.room=C:\Temp\&lt;bundle&gt;.exe -burn.filehandle.attached=540 -burn.filehandle.self=560'
  [0450:1944][2017-10-06T11:54:50]i000: Setting string variable 'WixBundleOriginalSource' to value 'C:\Temp\&lt;bundle&gt;.exe'
  [0450:1944][2017-10-06T11:54:50]i000: Setting string variable 'WixBundleOriginalSourceFolder' to value 'C:\Temp\'
  [0450:1944][2017-10-06T11:54:50]i000: Setting string variable 'WixBundleLog' to value 'C:\Users\&lt;user&gt;\AppData\Local\Temp\&lt;product-name&gt;_20171006115450.log'
  [0450:1944][2017-10-06T11:54:50]i000: Setting string variable 'WixBundleManufacturer' to value '&lt;company&gt;'
  [0450:145C][2017-10-06T11:54:50]i000: Setting numeric variable 'WixStdBALanguageId' to value 1033
  [0450:145C][2017-10-06T11:54:50]i000: Setting version variable 'WixBundleFileVersion' to value '7.0.0.0'
  [0450:1944][2017-10-06T11:54:50]i100: Detect begin, 17 packages
  [0450:1944][2017-10-06T11:54:50]i000: Setting string variable 'NETFRAMEWORK45' to value '460798'
  [0450:1944][2017-10-06T11:54:50]i000: Setting string variable 'UNINSTALLSTRING' to value '"C:\Users\&lt;user&gt;\AppData\Local\&lt;product&gt;\Update.exe" --uninstall -s'
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'VersionNT64' evaluates to false.
  [0450:1944][2017-10-06T11:54:50]i000: Setting string variable 'VCREDISTINSTALLEDX86' to value '14.0.24215'
  [0450:1944][2017-10-06T11:54:50]i000: Setting numeric variable 'FoundMfPlatDll' to value 1
  [0450:1944][2017-10-06T11:54:50]i000: Setting string variable 'WinRegInstallationType' to value 'Client'
  [0450:1944][2017-10-06T11:54:50]i000: Setting string variable 'WinRegReleaseID' to value '1703'
  [0450:1944][2017-10-06T11:54:50]i000: Registry key not found. Key = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Package_for_KB2919355~31bf3856ad364e35~amd64~~6.3.1.14'
  [0450:1944][2017-10-06T11:54:50]i000: Registry key not found. Key = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages\Package_for_KB2919355~31bf3856ad364e35~x86~~6.3.1.14'
  [0450:1944][2017-10-06T11:54:50]i102: Detected related bundle: {&lt;id&gt;}, type: Upgrade, scope: PerUser, version: 7.0.0.0, operation: None
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'NETFRAMEWORK45 &gt;= 394802' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll AND WinRegMediaPlayer' evaluates to false.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll AND WinRegMediaPlayer' evaluates to false.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'FoundMfPlatDll' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: NetFx462Web, state: Present, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: vcredist_x86, state: Absent, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: vcredist_x64, state: Absent, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin7x86, state: Present, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin7x64, state: Present, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin8x86, state: Absent, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin8x64, state: Absent, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin81x86, state: Present, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin81x64, state: Present, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin10x86, state: Present, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin10x64, state: Present, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin10x861511, state: Present, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: MediaPackWin10x641511, state: Present, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: Dokan_x86, state: Present, cached: Complete
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: Dokan_x64, state: Absent, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: &lt;product&gt;, state: Absent, cached: None
  [0450:1944][2017-10-06T11:54:50]i101: Detected package: custom_action.cmd, state: Absent, cached: Complete
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'VersionNT &gt;= v6.1' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'NOT ((VersionNT = v6.1) AND ((NOT ServicePackLevel) OR (ServicePackLevel &lt; 1)))' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i052: Condition 'NOT ((VersionNT = v6.3) AND (KB2919355_x86 &lt;&gt; 112 AND KB2919355_amd64 &lt;&gt; 112))' evaluates to true.
  [0450:1944][2017-10-06T11:54:50]i199: Detect complete, result: 0x0
  [0450:1944][2017-10-06T11:54:51]i200: Plan begin, 17 packages, action: Uninstall
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: custom_action.cmd
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: &lt;product&gt;
  [0450:1944][2017-10-06T11:54:51]w322: Skipping cross-scope dependency registration on package: Dokan_x64, bundle scope: PerUser, package scope: PerMachine
  [0450:1944][2017-10-06T11:54:51]w322: Skipping cross-scope dependency registration on package: Dokan_x86, bundle scope: PerUser, package scope: PerMachine
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin10x641511
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin10x861511
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin10x64
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin10x86
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin81x64
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin81x86
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin8x64
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin8x86
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin7x64
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: MediaPackWin7x86
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: vcredist_x64
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: vcredist_x86
  [0450:1944][2017-10-06T11:54:51]w321: Skipping dependency registration on package with no dependency providers: NetFx462Web
  [0450:1944][2017-10-06T11:54:51]i207: Planned related bundle: {&lt;id&gt;}, type: Upgrade, default requested: None, ba requested: None, execute: None, rollback: None, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: custom_action.cmd, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: Yes, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: &lt;product&gt;, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: Dokan_x64, state: Absent, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: Dokan_x86, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin10x641511, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin10x861511, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin10x64, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin10x86, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin81x64, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin81x86, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin8x64, state: Absent, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin8x86, state: Absent, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin7x64, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: MediaPackWin7x86, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: vcredist_x64, state: Absent, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: vcredist_x86, state: Absent, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i201: Planned package: NetFx462Web, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
  [0450:1944][2017-10-06T11:54:51]i299: Plan complete, result: 0x0
  [0450:1944][2017-10-06T11:54:51]i300: Apply begin
  [0450:1944][2017-10-06T11:54:52]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{&lt;id-2&gt;}, resume: Active, restart initiated: No, disable resume: No
  [0450:1944][2017-10-06T11:54:52]i351: Removing cached package: custom_action.cmd, from path: C:\Users\&lt;user&gt;\AppData\Local\Package Cache\1608BB75347CD8C40187E5F3C0A969ED73A98D51\
  [0450:1944][2017-10-06T11:54:52]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{&lt;id-2&gt;}, resume: None, restart: None, disable resume: No
  [0450:1944][2017-10-06T11:54:52]i330: Removed bundle dependency provider: {&lt;id-2&gt;}
  [0450:1944][2017-10-06T11:54:52]i352: Removing cached bundle: {&lt;id-2&gt;}, from path: C:\Users\&lt;user&gt;\AppData\Local\Package Cache\{&lt;id-2&gt;}\
  [0450:1944][2017-10-06T11:54:52]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{&lt;id-2&gt;}, resume: None, restart initiated: No, disable resume: No
  [0450:1944][2017-10-06T11:54:52]i399: Apply complete, result: 0x0, restart: None, ba requested restart:  No
  [0450:1944][2017-10-06T11:54:56]i500: Shutting down, exit code: 0x0
  [0450:1944][2017-10-06T11:54:56]i410: Variable: FoundMfPlatDll = 1
  [0450:1944][2017-10-06T11:54:56]i410: Variable: NETFRAMEWORK45 = 460798
  [0450:1944][2017-10-06T11:54:56]i410: Variable: SystemFolder = C:\WINDOWS\system32\
  [0450:1944][2017-10-06T11:54:56]i410: Variable: UNINSTALLSTRING = "C:\Users\&lt;user&gt;\AppData\Local\&lt;product&gt;\Update.exe" --uninstall -s
  [0450:1944][2017-10-06T11:54:56]i410: Variable: VCREDISTINSTALLEDX86 = 14.0.24215
  [0450:1944][2017-10-06T11:54:56]i410: Variable: VersionNT = 10.0.0.0
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WinRegInstallationType = Client
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WinRegReleaseID = 1703
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleAction = 3
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleElevated = 0
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleFileVersion = 7.0.0.0
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleInstalled = 1
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleLog = C:\Users\&lt;user&gt;\AppData\Local\Temp\&lt;product-name&gt;_20171006115450.log
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleManufacturer = &lt;company&gt;
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleName = &lt;product-name&gt;
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleOriginalSource = C:\Temp\&lt;bundle&gt;.exe
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleOriginalSourceFolder = C:\Temp\
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleProviderKey = {&lt;id-2&gt;}
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleSourceProcessFolder = C:\Temp\
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleSourceProcessPath = C:\Temp\&lt;bundle&gt;.exe
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleTag = 
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleUILevel = 4
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixBundleVersion = 7.0.0.0
  [0450:1944][2017-10-06T11:54:56]i410: Variable: WixStdBALanguageId = 1033
  [0450:1944][2017-10-06T11:54:56]i007: Exit code: 0x0, restarting: No
  </code></pre>
  
  <p>Any help is greatly appreciated!</p>