wixbootstrapperwix3.11

How to resolve source for WiX bootstrapper that is no longer available


I have a WiX-based installer with a managed bootstrapper application. I'm working on testing an upgrade scenario, where an older package should be uninstalled as part of the upgrade. When the upgrade installer runs the older installer in silent uninstall mode, the uninstall fails with this error:

[0970:1AF4][2022-08-05T15:34:49]w341: Prompt for source of container: WixAttachedContainer, path: E:\Bootstrapper.exe
[0970:1AF4][2022-08-05T15:34:49]e054: Failed to resolve source for file: E:\Bootstrapper.exe, error: 0x80070002.
[0970:1AF4][2022-08-05T15:34:49]e000: Error 0x80070002: Failed while prompting for source (original path 'E:\Bootstrapper.exe').
[0970:1AF4][2022-08-05T15:34:49]e311: Failed to acquire container: WixAttachedContainer to working path: C:\Windows\Temp\{334EB64E-1CAB-493F-B288-B4FF3EEE53A0}\2DED080EB63A85A0F4732ACF383347EACF8C9909, error: 0x80070002.
[0970:2DB4][2022-08-05T15:34:49]e000: Error 0x80070002: Failed while caching, aborting execution.
[22E8:1BE8][2022-08-05T15:34:49]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{85f6f153-1c67-4f5c-84ae-c175c76233be}, resume: ARP, restart: None, disable resume: Yes

and later in the log:

[0970:2DB4][2022-08-05T15:34:49]i410: Variable: WixBundleOriginalSource = E:\Bootstrapper.exe

When I installed the older version, the installer was in an ISO mounted as a virtual drive (E:). That ISO is no longer mounted, which seems to be causing the error here.

I've found this StackOverflow question with a similar situation, but the top answer doesn't seem like it would work for me because it suggests setting the WixBundleOriginalSource value as the local source for the package. Since that variable is set to a path that no longer exists, I don't think that's what I want to do, but I'm not 100% sure on that.


Solution

  • I eventually realized that the issue was that I was re-using the same cache IDs on the ExePackages in my bundle from the previous version. I'm not using auto-generated cache IDs for the packages because several of them share the same source file and payloads. Generating a new GUID for each CacheId seems to fix the issue.