This seems really odd. I have a program installed (via a WiX installer) and I'm trying to uninstall it programatically (using c#) so I use msiexec.exe /x{product-code-GUID}. The program is uninstalled but it still shows in the control panel (add/remove programs). When I look in the registry I see the program under HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\, but it's not under the GUID that this product has as its product code. It's under a seemingly random GUID that doesn't even exist in the .msi. Anyone know why and how I can tell what the GUID will be so that I can programtically remove it?
I guess I could install each version that I need to uninstall and inspect the registry and use the GUID that's there. That will work, but I want to understand why the GUID doesn't match the Product Code.
UPDATE 2-15-19 9:21am PT:
OK - I logged the uninstall and here's the end of the log. It seems to have completed successfully and yet it still appears in Control Panel:
MSI (s) (10:E4) [09:16:22:812]: Note: 1: 1724
MSI (s) (10:E4) [09:16:22:812]: Product: Product Name -- Removal completed successfully.
MSI (s) (10:E4) [09:16:22:812]: Windows Installer removed the product.
Product Name: Product Name. Product Version: 1.21.4. Product Language: 1033.
Manufacturer: . Removal success or error status: 0.
MSI (s) (10:E4) [09:16:22:870]: Deferring clean up of packages/files, if any
exist
MSI (s) (10:E4) [09:16:22:870]: MainEngineThread is returning 0
MSI (s) (10:80) [09:16:22:871]: RESTART MANAGER: Session closed.
MSI (s) (10:80) [09:16:22:871]: No System Restore sequence number for this
installation.
=== Logging stopped: 2/15/2019 9:16:22 ===
MSI (s) (10:80) [09:16:22:892]: User policy value 'DisableRollback' is 0
MSI (s) (10:80) [09:16:22:892]: Machine policy value 'DisableRollback' is 0
MSI (s) (10:80) [09:16:22:892]: Incrementing counter to disable shutdown.
Counter after increment: 0
MSI (s) (10:80) [09:16:22:892]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (10:80) [09:16:22:894]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (10:80) [09:16:22:894]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (10:80) [09:16:22:894]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (s) (10:80) [09:16:22:894]: Post-install cleanup: removing installer file 'C:\Windows\Installer\c8de6843.msi'
MSI (s) (10:80) [09:16:22:896]: Post-install cleanup: removing installer file 'C:\Windows\Installer\{2DE751D3-33F4-4C3E-BD12-63E7F7F0A3C9}\icon.ico'
MSI (s) (10:80) [09:16:22:896]: Post-install cleanup: removing installer folder 'C:\Windows\Installer\{2DE751D3-33F4-4C3E-BD12-63E7F7F0A3C9}\' (if empty)
MSI (s) (10:80) [09:16:22:896]: Note: 1: 2318 2:
MSI (s) (10:80) [09:16:22:897]: Destroying RemoteAPI object.
MSI (s) (10:B4) [09:16:22:897]: Custom Action Manager thread ending.
MSI (c) (78:7C) [09:16:22:898]: Decrementing counter to disable shutdown. If counter >= 0, shutdown will be denied. Counter after decrement: -1
MSI (c) (78:7C) [09:16:22:898]: MainEngineThread is returning 0
=== Verbose logging stopped: 2/15/2019 9:16:22 ===