2

So I'm taking over a pre-existing installer project but I really don't know too much about Wix and installers in general so I am just asking to get an idea what areas in this installer I should look into.

I have this problem where the .msi generated by my Wix installer installs properly. But on Windows 10, the Apps & Features page shows 2 entries for my app as well both of the entries have the "Uninstall" button greyed out.

I'm pretty lost what part of the .wxs is in charge of what shows up in the Control Panel, any help will be appreciated.

1
  • First thing to know about WiX is that its main feature is a tool build Windows Installer packages. You can't learn WiX without learning Windows Installer, directly or indirectly, and for some topics directly is better. Commented Apr 9, 2019 at 8:02

2 Answers 2

1

WiX Quick-Start: WiX is not trival to learn - there is a learning curve, but it is not rocket science either. Maybe I can suggest this WiX quick start recommentations piece (chaotic, but upvoted - must be helpful). Particularly the "Hello World" section might be helpful - if you don't know WiX.

Answers: With regards to the specific questions:

  • Failed Major Upgrade: The two entries in Add / Remove Programs generally means a major upgrade has failed so there are now two installed versions of your product instead of one (a major upgrade is technically an uninstall of the old version and install of the new version - under the hood). Here is a long answer on the topic: Doing Major Upgrade in Wix creates 2 entries in Add/Remove Programs.
  • Embedded Setup.exe: It is also possible for an MSI to install a legacy-style setup.exe as part of its own installation. This could lead to several entries in Add / Remove Programs.
  • MajorUpgrade: To fix the major upgrade you need to look in your WiX sources, obviously. Normally people use the MajorUpgrade element to configure major upgrades (there are more detailed options using other elements). See separate section below for more on this.
  • Product Code: Whenever you have two versions of the same product installed, you have different product codes for them. To find the product codes, here are some suggestions: How can I find the product GUID of an installed MSI setup? Once you have the product codes you can uninstall via the msiexec.exe command line.
  • Uninstall: You can uninstall MSI files in a myriad of ways, here is a reference: Uninstalling an MSI file from the command line without using msiexec. Suggest you use msiexec.exe in section 3, as follows:

    msiexec.exe /x {Product-Code}
    

WiX Major Upgrades: WiX introduced a "convenience element" to control major upgrade quite a while back. The idea was to make implementation easier. Here are some details: Majorupgrade or Upgrade ID which is preferred for Major upgrade?

Inlined:

<MajorUpgrade DowngradeErrorMessage="Can’t downgrade." />

As you can see the newer approach is much simpler to deal with, whilst the old one allows full flexibility. I don't know which approach your sources use.

Major Upgrade Technicalities: The key issues for a major upgrade is that the Upgrade Code remains stable (some ways to do it without, but leaving that for now). In addition you need a new product code, a bumped up product version (one of the first 3 digits) and a new package code. If any of these changes fail to be made you can get two entries in Add / Remove Programs (failed upgrade whilst running).


Some Links:

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for replying, I'll definitely take a look at that quickstart guide. For this specific problem though, I have gotten the duplicate entries from a clean install (no upgrade). Maybe there's some copy paste code in the .wxs?
Is it a burn bundle?
What is a burn bundle?
A burn bundle is a setup.exe that may embed several MSI files and other EXE files and some other deployment files. It has the same markup style as a regular WiX XML file (*.wxs), but the schema is different and it compiles setup.exe files instead of Setup.msi files. It is a bootstrapper / launcher / downloader kind of thing.
0

Thanks to Stein Åsmul for his link to documentation. I was able to figure out why my msi was doing what it was doing.

The main .wxs was disabling the Remove with the property

<Property Id="ARPNOREMOVE" Value="1" />

So removing that allowed me to Uninstall from the Windows Control Panel again.

The reason why 2 entries were showing up in the Control Panel though was that we were adding a bunch of registry entries in the folder

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\

There's some reasons behind needing some registry entries here, but at least now that I know why I can hopefully work around them. Hopefully this helps anyone in the future that might run into this problem of duplicate entries from clean installs.

9 Comments

The ARPNOREMOVE entries are rarely made without reason. Adding stuff directly to that Uninstall registry location is also not good practice. I would try to chat with the people who made those setups to figure out why they have done what they have done. Usually there are some hacky reasons. Info on ARPNOREMOVE and similar properties here.
I won't get into too much detail, but contractors, they were fired.
OK, if it is not sensitive you can always put it on github.com for a quick review. Just some advice if it is not too hairy or big.
It's hairy, sensitive and big. I'm trying to chunk the entire thing into small problems to tackle one at a time. Hopefully I can refactor it in the future to be proper but for now I just have to put out each small fire. Thank though for all your help.
A "hairy, sensitive and big" problem space can be challenging to navigate one StackOverflow question after another. You do not have to go alone. We list commercial and community-based support options at firegiant.com/support-options that may (or may not) be interesting to you. Setup isn't just xcopy, welcome to the dark side, we have cookies. :)
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.