0

I'm trying to uninstall an older version of our product which was installed using a WiX-built installer and after uninstalling it silently:

msiexec /x{GUID}

the program still appears in Control Panel. I've opened a separate item to explore that mystery, but another curious issue has popped up. I noticed that after running the install for this program, two entries (GUIDs) are added to HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall. One with the product GUID and one that I have no idea where it comes from. I've searched through the .msi and it's not in there. Both are created each time I install, both are removed if I uninstall from the Control Panel and both are left in the registry if I uninstall from the command line. So have a look

enter image description here


enter image description here

Anyone have any ideas what's going on here?

Community
  • 1
  • 1
Ben_G
  • 724
  • 1
  • 7
  • 21

1 Answers1

0

Embedded Setup.exe: In essence it looks like you are installing an MSI that also installs an embedded non-MSI setup.exe via a custom action as part of its own installation sequence. Or, there is a setup.exe launcher that kicks off the MSI and the legacy setup in sequence. Result: two entries in Add / Remove Programs.

Uninstall: It is obvious, but to get rid of the second entry you must run its uninstall sequence - in addition to the uninstall of the MSI. Non-MSI setups are less reliable when it comes to uninstall than MSI packages. The implicitly available uninstall for all MSI packages with reliable silent running is one of the core benefits of MSI: MSI Core Benefits (among other topics).

Uninstall Commands: Try running the silent uninstall string, I guess that is what you have done?

Run commands elevated! With admin rights!

REM Uninstall MSI
msiexec.exe /x {PRODUCT-GUID} /L*v C:\MySetup.log /QN

REM Uninstall legacy setup.exe
"%SystemDrive%\ProgramData\Package Cache\{c5f0cb3e-1de3-4971-843a-abb981ed670c}\MDRSetup.exe" /uninstall /quiet

Silent Running: To run legacy setups silently you sometimes have to record a "response file" to record all settings in the GUI and pass to the uninstall process. I have some previous answers on this. You also need to run with admin rights:


Application Repackaging: What is the name of the software you are installing? MDRSetup.exe, is that Max Data Recovery 1.9? Probably not. Getting rid of legacy software can be challenging. You can always try to re-package it as an MSI if you have the tools to do so, or maybe you have a team in your company to do so (all large companies tend to). Not all legacy setups can be repackaged. There could be constructs that are impossible to capture, such as certain drivers, generated and unique keys per machine etc...


Links:

Stein Åsmul
  • 34,628
  • 23
  • 78
  • 140
  • Stein - I have no idea what creates the second installer because I've gone through the WiX code and there is no reference to any other setup.exe or .msi package, but C:\ProgramData\Package Cache\{c5f0cb3e-1de3-4971-843a-abb981ed670c}\mdrsetup.exe /uninstall /quiet solved both issues (both this one and https://stackoverflow.com/questions/54697934/after-using-msiexec-to-uninstall-a-program-it-remains-in-the-control-panel-add), so thanks so much for your help! – Ben_G Feb 20 '19 at 16:38
  • Is this an MSI file? What do you see in the `Binary table`? With WiX installed you can de-compile the MSI to see what it contains by using the `dark.exe` binary and specify to extract binaries: `dark.exe YourSetup.msi /x Bins` => Creates a Bin folder with extracted binaries and a WXS WiX source file in root of folder hierarchy. Or maybe the MSI also is wrapped in a `setup.exe`? Maybe it was just the missing admin rights that made it fall over? – Stein Åsmul Feb 20 '19 at 16:45
  • WiX Burn Setup.exe bundles can also be decompiled. [See section 4 in this answer](https://stackoverflow.com/a/48482546/129130). – Stein Åsmul Feb 20 '19 at 17:06