I have a bundle that installs a few MSIs and a few executables. Uninstallation isn't working.
I think that old references to packages are somehow messing up "new" uninstallations. In this post, Rob Mensching explains a bit about it. In the explanation, he says to look at a section in the Bundle's log files called "Plan" which would show "lines" (?) for each package.
Problem is, the log file doesn't make any sense to me. There's something about a "plan", but... it's gobbledygook to me.
Another indication that old references are the problem is that uninstallation works fine when I install/uninstall on a freshly minted VM. However, me telling the client "I swear it'll work on other machines" ain't gonna cut it, and the demos have to be on the machine that has the old references.
My questions are:
- (1) how to find these old references (lines?).
- (2) how to get rid of them so it "feels like the first time" for the machine (randomly deleting keys from the registry is probably the best method here).
Below is the section in the log file about "Plans", if that helps. I'm using WiX version 3.10.
[0E94:0EC8][2017-01-20T10:27:38]i200: Plan begin, 6 packages, action: Uninstall
[0E94:0EC8][2017-01-20T10:27:38]w321: Skipping dependency registration on package with no dependency providers: XXX_V1.2.0.2.exe
[0E94:0EC8][2017-01-20T10:27:38]i000: Setting string variable 'XXXXX.msi' to value 'C:\Users\XXX\XXX\log_000_XXX.msi_rollback.txt'
[0E94:0EC8][2017-01-20T10:27:38]i000: Setting string variable 'WixBundleLog_XXX.msi' to value 'C:\Users\XXX\XXX\log_000_XXX.msi.txt'
[0E94:0EC8][2017-01-20T10:27:38]i000: Setting string variable 'WixBundleRollbackLog_XXXSetup.msi' to value 'C:\Users\XXX\Desktop\log_001_XXXSetup.msi_rollback.txt'
[0E94:0EC8][2017-01-20T10:27:38]i000: Setting string variable 'WixBundleLog_XXXSetup.msi' to value 'C:\Users\XXX\Desktop\log_001_XXXSetup.msi.txt'
[0E94:0EC8][2017-01-20T10:27:38]w321: Skipping dependency registration on package with no dependency providers: XXX.exe
[0E94:0EC8][2017-01-20T10:27:38]w321: Skipping dependency registration on package with no dependency providers: XXX.x86.exe
[0E94:0EC8][2017-01-20T10:27:38]w321: Skipping dependency registration on package with no dependency providers: Microsoft_dot_Net_4.5.2
[0E94:0EC8][2017-01-20T10:27:38]i201: Planned package: XXX_V1.2.0.2.exe, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: Yes, dependency: None
[0E94:0EC8][2017-01-20T10:27:38]i201: Planned package: XXXSetup.msi, state: Present, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, cache: No, uncache: Yes, dependency: Unregister
[0E94:0EC8][2017-01-20T10:27:38]i201: Planned package: XXXSetup.msi, state: Present, default requested: Absent, ba requested: Absent, execute: Uninstall, rollback: Install, cache: No, uncache: Yes, dependency: Unregister
[0E94:0EC8][2017-01-20T10:27:38]i201: Planned package: XXX.exe, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: Yes, dependency: None
[0E94:0EC8][2017-01-20T10:27:38]i201: Planned package: XXX.x86.exe, state: Absent, default requested: Absent, ba requested: Absent, execute: None, rollback: None, cache: No, uncache: Yes, dependency: None
[0E94:0EC8][2017-01-20T10:27:38]i201: Planned package: Microsoft_dot_Net_4.5.2, state: Present, default requested: None, ba requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: None
[0E94:0EC8][2017-01-20T10:27:38]i299: Plan complete, result: 0x0
[0E94:0EC8][2017-01-20T10:27:38]i300: Apply begin
[0E94:0EC8][2017-01-20T10:27:38]i010: Launching elevated engine process.
[0E94:0EC8][2017-01-20T10:27:40]i011: Launched elevated engine process.
[0E94:0EC8][2017-01-20T10:27:40]i012: Connected to elevated engine.
[0230:01EC][2017-01-20T10:27:40]i358: Pausing automatic updates.
[0230:01EC][2017-01-20T10:27:40]i359: Paused automatic updates.
[0230:01EC][2017-01-20T10:27:40]i360: Creating a system restore point.
[0230:01EC][2017-01-20T10:28:04]i361: Created a system restore point.
[0230:01EC][2017-01-20T10:28:04]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{d4c11c74-6db1-4b6a-888e-b3aef93815bb}, resume: Active, restart initiated: No, disable resume: No
[0230:01EC][2017-01-20T10:28:04]i326: Removed dependency: {d4c11c74-6db1-4b6a-888e-b3aef93815bb} on package provider: {8F883724-F58E-438D-9584-FE6ECC3F4E09}, package XXXSetup.msi
[0230:01EC][2017-01-20T10:28:04]i329: Removed package dependency provider: {8F883724-F58E-438D-9584-FE6ECC3F4E09}, package: XXXSetup.msi
[0230:01EC][2017-01-20T10:28:04]i301: Applying execute package: XXXSetup.msi, action: Uninstall, path: (null), arguments: ' MSIFASTINSTALL="7"'
[0E94:0EC8][2017-01-20T10:28:07]i319: Applied execute package: XXXSetup.msi, result: 0x0, restart: None
[0230:01EC][2017-01-20T10:28:07]i326: Removed dependency: {d4c11c74-6db1-4b6a-888e-b3aef93815bb} on package provider: {6D39216E-61B1-4CC4-8975-D3F04CD05539}, package XXXSetup.msi
[0230:01EC][2017-01-20T10:28:07]i329: Removed package dependency provider: {6D39216E-61B1-4CC4-8975-D3F04CD05539}, package: XXXSetup.msi
[0230:01EC][2017-01-20T10:28:07]i301: Applying execute package: XXXSetup.msi, action: Uninstall, path: (null), arguments: ' MSIFASTINSTALL="7"'
[0E94:0EC8][2017-01-20T10:28:10]i319: Applied execute package: XXXSetup.msi, result: 0x0, restart: None
[0230:01EC][2017-01-20T10:28:10]i351: Removing cached package: XXX_V1.2.0.2.exe, from path: C:\ProgramData\Package Cache\8B2B0A54AE84D8D551BDC4E28C33AFD0391232F3\
[0230:01EC][2017-01-20T10:28:10]i351: Removing cached package: XXXSetup.msi, from path: C:\ProgramData\Package Cache\{8F883724-F58E-438D-9584-FE6ECC3F4E09}v1.0.1.23\
[0230:01EC][2017-01-20T10:28:10]i351: Removing cached package: XXXSetup.msi, from path: C:\ProgramData\Package Cache\{6D39216E-61B1-4CC4-8975-D3F04CD05539}v1.0.2.0\
[0230:01EC][2017-01-20T10:28:10]i351: Removing cached package: XXX.exe, from path: C:\ProgramData\Package Cache\23ED8831EA9E38F55444F8A86EC3804B0DF377F3\
[0230:01EC][2017-01-20T10:28:10]i351: Removing cached package: XXX.x86.exe, from path: C:\ProgramData\Package Cache\BFB74E498C44D3A103CA3AA2831763FB417134D1\
[0230:01EC][2017-01-20T10:28:10]i372: Session end, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{d4c11c74-6db1-4b6a-888e-b3aef93815bb}, resume: None, restart: None, disable resume: No
[0230:01EC][2017-01-20T10:28:10]i330: Removed bundle dependency provider: {d4c11c74-6db1-4b6a-888e-b3aef93815bb}
[0230:01EC][2017-01-20T10:28:10]i352: Removing cached bundle: {d4c11c74-6db1-4b6a-888e-b3aef93815bb}, from path: C:\ProgramData\Package Cache\{d4c11c74-6db1-4b6a-888e-b3aef93815bb}\
[0230:01EC][2017-01-20T10:28:10]i371: Updating session, registration key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{d4c11c74-6db1-4b6a-888e-b3aef93815bb}, resume: None, restart initiated: No, disable resume: No
[0E94:0EC8][2017-01-20T10:28:10]i399: Apply complete, result: 0x0, restart: None, ba requested restart: No
[0E94:0EC8][2017-01-20T10:28:12]i500: Shutting down, exit code: 0x0
EDIT >>
I figured out what the problem could be. When I first started reading about the <Component>
element, it said that -- provided that you are nesting only a single <File>
element in each <Component>
element -- creating a GUID for each <Component>
is unnecessary (in WiX 3.10). WiX would auto-magically create one for you.
So that's what I did. And I think that's what caused the "unable to uninstall" problem.
I think it's sort of like Guid="*"
in that it creates a different GUID each time the solution is built. Therefore, each time you install the product it registers a different GUID into the registry.
Now let's imagine that you're installing, repairing, and uninstalling over & over on your test machine. After a while, you have a gazillion GUIDs linking to the same components. So when an uninstallation happens, sure, it removes the latest GUID, but there are plenty more where that came from, leaving the component, ultimately, unable to be removed when uninstalled.
This would also account for why an uninstallation would work on a fresh machine.
The answer was simple -- I just went through and manually put a GUID into every single <Component>
.
The solutions works, but I wonder if my reasoning is correct?