0

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.

2 Answers2

1

You should be able to run the original bundle and it will definitely recognize that it is already installed. Then you should be able to uninstall or repair.

Note, there should have been a prompt to let you browse to the original bundle from the install UI.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130
  • Sure, I can uninstall the old bundle from the Windows apps and features settings panel, or by re-running the original bundle by mounting the ISO again. But I need the new bundle version to be able to uninstall the old bundle as part of the upgrade. I probably didn't see a prompt since the uninstaller is running in silent mode. – Brian Henry Aug 09 '22 at 15:17
  • 1
    Ahh, then I think the real question is: Why is the old bundle prompting for source during upgrade? The log file will show you that and it could be the old bundle has a flaw. Or perhaps, the old bundle got corrupted and needs to be repaired to get upgraded correctly. Or something else. The log file will show you the way. – Rob Mensching Aug 09 '22 at 17:21
0

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.