0

I am currently utilizing a WiX v4 bootstrapper bundle to install and uninstall an MsiPackage. Although I've encountered no issues during the installation process, I've been unable to successfully execute the uninstallation. Strangely, rather than triggering the uninstallation dialogue, initiating the uninstall process opens the installation dialogue of the Msi.

Here's an excerpt of the relevant error codes from the installer_*.log file:

... (omit for brevity)
[2A50:7730][2023-06-06T14:16:52]i370: Session begin, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4E2E0599-61F5-40A3-AA8F-3DF134052F2D}, options: 0x3, disable resume: No
[2A50:7730][2023-06-06T14:16:52]i000: Caching bundle from: 'C:\Users\L4AB1~1.SCH\AppData\Local\Temp\{91FB9950-C5E6-40BE-A718-600ECF3EC42B}\.be\WixBundleInstaller.exe' to: 'C:\ProgramData\Package Cache\{4E2E0599-61F5-40A3-AA8F-3DF134052F2D}\WixBundleInstaller.exe'
[2A50:7730][2023-06-06T14:16:52]i320: Registering bundle dependency provider: {4E2E0599-61F5-40A3-AA8F-3DF134052F2D}, version: 12.3.2
[2A50:7730][2023-06-06T14:16:52]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4E2E0599-61F5-40A3-AA8F-3DF134052F2D}, resume: Active, restart initiated: No, disable resume: No
[2A50:4168][2023-06-06T14:16:52]i304: Verified existing payload: WixMsiInstaller.msi at path: C:\ProgramData\Package Cache\{C4AC8AB6-436A-4212-A838-D1FFB6F503A4}v12.3.2\WixMsiInstaller.msi.
[2A50:7730][2023-06-06T14:16:52]i326: Removed dependency: {4E2E0599-61F5-40A3-AA8F-3DF134052F2D} on package provider: {C4AC8AB6-436A-4212-A838-D1FFB6F503A4}_v12.3.2, package WixMsiInstaller.msi
[2A50:7730][2023-06-06T14:16:52]i329: Removed package dependency provider: {C4AC8AB6-436A-4212-A838-D1FFB6F503A4}_v12.3.2, package: WixMsiInstaller.msi
[2A50:7730][2023-06-06T14:16:52]i301: Applying execute package: WixMsiInstaller.msi, action: Uninstall, path: (null), arguments: ' ALLUSERS="1" ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" BURNMSIUNINSTALL=1 REBOOT=ReallySuppress IGNOREDEPENDENCIES=ALL'
[2A50:7730][2023-06-06T14:17:06]e000: Error 0x80070643: Failed to configure product: {C4AC8AB6-436A-4212-A838-D1FFB6F503A4}
[2A50:7730][2023-06-06T14:17:06]e000: Error 0x80070643: Failed to uninstall MSI package.
[2A50:7730][2023-06-06T14:17:06]e000: Error 0x80070643: Failed to execute MSI package.
[5024:4440][2023-06-06T14:17:06]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[5024:4440][2023-06-06T14:17:06]i319: Applied execute package: WixMsiInstaller.msi, result: 0x80070643, restart: None
[5024:4440][2023-06-06T14:17:06]e000: Error 0x80070643: Failed to execute MSI package.
...

Intriguingly, when I independently open the MSI using the arguments from the bundle log, it displays the uninstallation dialog and permits me to uninstall the program. I've also verified that the MSI works by manually installation and uninstallation of the MSI package (without the bundle).

Manual command with arguments from the log I've tried (which works fine):

msiexec /i "WixMsiInstaller.msi" ALLUSERS="1" ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" BURNMSIUNINSTALL=1 REBOOT=ReallySuppress IGNOREDEPENDENCIES=ALL

I attempted to address this issue by enabling ForcePerMachine="Yes", as suggested in another Stack Overflow post which did not work in my case. This is the package code I use in the burn bundle:

<MsiPackage
  Id="Installation of Main Package"
  SourceFile="$(MainPackageSourceFile)"
  Permanent="no"
  Vital="yes"
  Visible="no"
  Cache="keep"
  ForcePerMachine="yes"
  Compressed="no"
  bal:DisplayInternalUICondition="1"
  EnableFeatureSelection="no">
</MsiPackage>

I have also set Scope="perMachine" in the MSI package.

Despite upgrading from WiX 4.0.0 to 4.0.1, this issue persists. I'm at a loss as to what might be the cause of this problem. If anyone has encountered a similar issue or has insights into potential resolutions, your input would be greatly appreciated. Thanks!

Lucas
  • 373
  • 1
  • 9
  • Burn creates a verbose log for each package in the chain that will have the details of the failure. – Bob Arnson Jun 06 '23 at 13:48
  • Thanks @BobArnson. I've found the problem causing the error in the msi's log. However the MSI installer will still show the installation dialog, instead of the uninstallation dialog. Even that 'REMOVE' evaluates to true. Do you have any idea what could cause that behavior? – Lucas Jun 06 '23 at 14:46
  • There's no MSI concept of 'the uninstallation dialog' -- it's all driven by the UI authoring and the conditions it uses. – Bob Arnson Jun 06 '23 at 17:19
  • Right, I should have mentioned that I use the WixUI dialog set, specifically WixUI_Mondo. I have now found a workaround by manually setting WixUI_InstallMode = Remove when Condition = REMOVE. This uninstalls the MSI when the bootstrapper bundle is uninstalled, but it displays the "ResumeDlg" so the buttons value is "Install" instead of "Remove". Do you have any idea how I can solve that issue properly, so that the uninstall of the bundle will also call/show the msi's removal dialog? – Lucas Jun 29 '23 at 14:51
  • This works in WixUI in v4. – Bob Arnson Jun 29 '23 at 17:10
  • I've been delving into the issue and have prepared a simplified example to further understand the problem. It appears there might be a bug with the bal extension 4.0.1. Specifically, if I configure bal:DisplayInternalUICondition attribute to "1" for the MsiPackage, the user interface does indeed appear. However, an unexpected side effect occurs during the bundle's uninstallation - the "ResumeDlg" is displayed. – Lucas Jul 03 '23 at 08:17
  • If you have a simple repro repo, please open a bug. – Bob Arnson Jul 03 '23 at 14:24

0 Answers0