1

I have a wix installer which copies application dlls and installs a windows service. It also creates shortcuts in programs menu (one for the app and one for uninstall process). Shortcut for uninstall looks like the following:

 <Shortcut Id="UninstallProduct"
           Name="Application"
           Target="[SystemFolder]msiexec.exe"
           Arguments="/x [ProductCode]" />

Application is installed correctly, but when I try to uninstall it by the shortcut something is going wrong. All folders and files created by installer are being removed but when I enter add/remove programs menu I see entry for my application (need to remove it from context menu - it removes application completely).

What can be wrong with unistall shortcut? How to force it to remove application from the system?

All guids (for product, components) are created like this: Guid="*"

PhilDW
  • 20,260
  • 1
  • 18
  • 28
crocodayl
  • 99
  • 9
  • I guess you need to look into uninstallation log (which is created by default in your %temp% folder) and see what exactly happens during uninstallation. – rs232 Mar 23 '18 at 14:02
  • MSI installs/uninstalls are transactions - they either completely work or completely fail. That's why it makes no sense that the product is partially removed. If you have Add/Remove Programs open at the time and still see your entry it could be a caching issue - I've seen those cases where you can refresh the display (with F5) and it disappears. – PhilDW Mar 26 '18 at 18:08

1 Answers1

0

I think you have your answer already, but I would check both things others have mentioned:

  1. Check the log file for the uninstall. I am not aware that log files are generated automatically - unless this is new in Windows 10 or something.
  2. If you see your product listed in Add / Remove after you think it is uninstalled, then the uninstall did not complete properly. Some possibilities exist.
    • Your uninstall could have custom actions that delete stuff on their own, and if they don't have rollback custom actions associated with them files could be missing after the failed uninstall is rolled back.
    • Re-opening the Add / Remove applet as PhilDW suggest will tell you whether the uninstall actually failed or not.
    • Are you on a real test box or is this your development box? During development it is not uncommon to end up with several versions of the same product installed on the same box - especially when you auto-generate your product guid and your major upgrade configuration isn't properly set up (yet). Test on a test virtual to make sure.

Overall suggestion: lose the whole uninstall shortcut! Such shortcuts have been undesired since the early 2000s, and I believe they are still a logo violation for Microsoft. In fact, I believe certain types of shortcuts are actually auto-hidden by the system itself. I wrote an answer on this a while back: Wix Uninstall Shortcut not working (please do have a quick read).

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164