Slamit
Slamit

Reputation: 553

Wix 4 installer - duplicate windows program manager entry

I generate a .msi package with the below wix 4 product.wxs file but for some reasons if I increase the version number (or keep the same) just and generate a new .msi file, the installer create a new entry in the windows program manager instead of upgrading the existing one.

I have set the product code to * and have a fix upgrade code so I'm not sure what I am missing.

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">

<?include Definitions.wxi?>
<!-- Package definition -->
<Package 
    Name="$(var.AppName)"  
    Language="1033" 
    Version="$(var.ProductVersion)" 
    Manufacturer="$(var.CompanyName)"  
    UpgradeCode="12345678-6543-2112-3456-876543210fff" 
    InstallerVersion="200" 
    ProductCode="*">
    
    <MajorUpgrade 
        Schedule="afterInstallInitialize" 
        AllowDowngrades="no"
        DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    
    <MediaTemplate EmbedCab="yes" />

    <!-- Icon definition -->
    <Icon Id="WixIcon" SourceFile="$(var.IconFile)" />

    <!-- Add the icon to the Control Panel in Add/Remove Programs -->
    <Property Id="ARPPRODUCTICON" Value="WixIcon" />
    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
    <Property Id="DESKTOP_SHORTCUT" Value="0" />
    <Property Id="START_MENU_SHORTCUT" Value="0" />
    
    ...

</Package>

Duplicate entries in windows program manager

When I run the same MSI file twice I get the correct behavior with the wix package offering to repair or uninstall instead of installing again.

What am I missing?

Edit: I only find help and questions related to Wix 3 is WIX 4 not used by anyone?

Edit 2: even the AI I tried were not able to give me some valid hint or answer. Am I facing a problem so hard to resolve?

Edit 3: I have researched this on the side for a while now with no positive results. I'm surprised at how little wix 4 and 5 examples I find and how little documentation there is for these versions. Or I'm really looking at the wrong places. or a tool so often used I would have expected to find a lot more.

Upvotes: 0

Views: 47

Answers (0)

Related Questions