You seem to be missing an upgrade table. The simplest way to add this is to use MajorUpgrade element and set the attribute appropriately.
Neil >Hi everyone, > >I've got a long-running application we just upgraded to .NET 4.5 and WiX. >It's had the same UpgradeCode for ages, so I included it in my >Product-file for WiX. It installed side-by-side with the existing >application. Reading up some, it seemed like I had to add a directive to >remove existing products. Good, I'd like to do that before the installer >does anything else. Just remove everything that was and put in this new >installer. That's how we do it everytime. Adding the directive, I thought >along with the UpgradeCode, I'm good to go ... but, it does not remove, >and I still get two items for this application in Add/Remove Programs. >This is my XML, and what I'm trying to do is simply remove all previous >versions (that have the UpgradeCode) and then put on this version 4.3.0 >(previous version was 4.2.0 and a Visual Studio Installer Project): > ><?xml version="1.0" encoding="UTF-8"?> ><Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" >xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"> > <Product Id="*" Name="Program Name Removed" Language="1033" >Version="4.3.0" Manufacturer="Company Name Removed" >UpgradeCode="17652B67-2C4F-4752-88CE-0E300DEA4C2F"> > <Package > InstallerVersion="200" > Compressed="yes" > InstallScope="perMachine" > InstallPrivileges="elevated" > Manufacturer="Company Name Removed" > Platform="x86" > /> > > <!-- BEGIN: License Agreement --> > <WixVariable Id="WixUILicenseRtf" >Value="SetupResources/LicenseAgreement.rtf" /> > > <!-- BEGIN: UI Bitmaps --> > <WixVariable Id="WixUIBannerBmp" >Value="SetupResources/WiXDefBannerBitmap.bmp" /> > <WixVariable Id="WixUIDialogBmp" >Value="SetupResources/WiXDefDialogBitmap.bmp" /> > <!-- BEGIN: Custom Actions --> > <CustomAction Id='validateSqlServer' BinaryKey='customPaActions' >DllEntry='ValidateSqlServer' /> > <CustomAction Id='validateTpdb' BinaryKey='customPaActions' >DllEntry='ValidateTpdb' /> > <CustomAction Id='validateProductDb' BinaryKey='customPaActions' >DllEntry='ValidateProductDb' /> > <CustomAction Id='tryUpdateTpdb' BinaryKey='customPaActions' >DllEntry='TryUpdateTpdb' /> > > <Binary Id='customPaActions' SourceFile='D:\TFS\Program Name >Removed\Main\Src\Program Name Removed\WiX.PA.CustomActions\obj\x86\WiX >Project Output Configuration\WiX.PA.CustomActions.CA.dll' /> > > <!-- BEGIN: Single MSI --> > <MediaTemplate EmbedCab="yes" /> > <!-- BEGIN: Application Icon --> > <Icon Id="appicon.ico" SourceFile="SetupResources/appicon.ico"/> > <!-- BEGIN: .NET Version Launch Condition --> > <PropertyRef Id="NETFRAMEWORK45" /> > <Condition Message="You must install Microsoft .NET 4.5"> > <![CDATA[Installed OR NETFRAMEWORK45]]> > </Condition> > <InstallExecuteSequence> > <RemoveExistingProducts After="InstallInitialize" /> > <InstallExecute After="RemoveExistingProducts" /> > <Custom Action="validateSqlServer" Before="validateProductDb">NOT >Installed</Custom> > <Custom Action="validateProductDb" Before="validateTpdb">NOT >Installed</Custom> > <Custom Action="validateTpdb" Before="tryUpdateTpdb">NOT >Installed</Custom> > <Custom Action="tryUpdateTpdb" Before="InstallFinalize">NOT >Installed</Custom> > </InstallExecuteSequence> > > <!-- BEGIN: File System --> > <Directory Id="TARGETDIR" Name="SourceDir"> > <Directory Id="ProgramFilesFolder"> > <Directory Id="CompanyFolder" Name="Company Name Removed"> > <Directory Id="INSTALLDIRECTORY" Name="Program Name Removed"> > <Directory Id="Cache" Name="Cache"> > <Directory Id="Images" Name="Images"> > </Directory> > </Directory> > <Directory Id="Help" Name="Help"/> > </Directory> > </Directory> > </Directory> > <Directory Id="DesktopFolder" Name="Desktop"></Directory> > <Directory Id="StartMenuFolder" Name="StartMenu"></Directory> > <Directory Id="StartupFolder" Name="StartUp"></Directory> > <Directory Id='AppDataFolder' Name='Roaming'> > <Directory Id="Company Name RemovedFolder" Name="Company Name >Removed"> > <Directory Id='ProgramNameRemovedFolder' Name='Program Name >Removed'> > <Directory Id='SettingsFolder' Name='Settings'/> > <Directory Id='ErrorFolder' Name='Error'/> > <Directory Id='CacheFolder' Name='Cache'/> > <Directory Id='LogFolder' Name='Log'/> > </Directory> > </Directory> > </Directory> > <Directory Id="ProgramMenuFolder"> > <Directory Id="ApplicationProgramsFolder" Name="Program Name >Removed"/> > </Directory> > </Directory> > <!-- BEGIN: Features --> > <Feature Id="ProductFeature" ConfigurableDirectory="TARGETDIR" >Level="1"> > <ComponentGroupRef Id="Shortcuts"/> > <ComponentGroupRef Id="ProductComponents.Help" /> > <ComponentGroupRef Id="ProductComponents.Images" /> > <ComponentGroupRef Id="ProductComponents.RoamingFolders" /> > <ComponentGroupRef Id="HeatBinaryFiles" /> > </Feature> > > <!-- BEGIN: Add/Remove Programs Icon --> > <Property Id="ARPPRODUCTICON" Value="appicon.ico" /> > > <!-- BEGIN: User Interface --> > <UIRef Id="WixUI_APPNAME" /> > > </Product> ></Wix> > >Any sharp eyes seeing what I'm doing wrong? Relating back to Visual >Studio Installers, I just checked "remove existing versions" (and detect >newer versions) or what it was called again, and it's the same behavior >I'm looking for here. > >Best Regards, > >Tom > >-------------------------------------------------------------------------- >---- >See everything from the browser to the database with AppDynamics >Get end-to-end visibility with application monitoring from AppDynamics >Isolate bottlenecks and diagnose root cause in seconds. >Start your free trial of AppDynamics Pro today! >http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktr >k >_______________________________________________ >WiX-users mailing list >WiX-users@lists.sourceforge.net >https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users