Gentlemen,
 
Thank you for your replies. MajorUpgrade seemed simple enough, so I added this:
 
<MajorUpgrade DowngradeErrorMessage="A newer version of Product Name Removed is 
already installed."/>

Documentation gave me the impression I could remove this portion and so I did: 
 
       <RemoveExistingProducts After="InstallInitialize" />
       <InstallExecute After="RemoveExistingProducts" />

I've also tried the suggestion on the slightly larger block of code using 
Upgrade-element. These two approaches produce the same results when I've got 
version 4.2.0 installed and
attempt to install 4.3.0:
 
- files are replaced in the installation directory only when 
AssemblyFileVersion is greater than the existing file's AssemblyFileVersion; I 
expected it to remove all files and put in the new ones.
- two entries for the application are in Add/Remove Programs and two shortcuts 
are on the desktop; I expected it to remove the 4.2.0 entries in Add/Remove 
Programs and so forth.
 
The documentation on MajorUpgrade about scheduling says:
 
"This scheduling removes the installed product entirely before installing the 
upgrade product. "
 
However, it would appear not since it selectively replaces files based on 
AssemblyFileVersion. There is one thing different between 4.2.0 and 4.3.0 and 
it's the publisher's name (that appears in Add/Remove Programs). 
I changed it to be identical, but it's still no difference. I've tried 
comparing 4.2.0 and 4.3.0 installers through Orca, but the magnitude of 
information in the two is so different in the Property-table. This is what the
Upgrade-table looks like, though:
 
// Version 4.2.0
{17652B67-2C4F-4752-88CE-0E300DEA4C2F}  4.2.0  0  PREVIOUSVERSIONSINSTALLED
{17652B67-2C4F-4752-88CE-0E300DEA4C2F} 4.2.0   258  NEWERPRODUCTFOUND

// Version 4.3.0
{17652B67-2C4F-4752-88CE-0E300DEA4C2F}  4.3.0  1  WIX_UPGRADE_DETECTED
{17652B67-2C4F-4752-88CE-0E300DEA4C2F} 4.3.0   2  WIX_DOWNGRADE_DETECTED

Then InstallExecuteSequence differs as well:
 
// Version 4.2.0
InstallValidate  1400
InstallInitialize  1500
RemoveExistingProducts  1525

// Version 4.3.0
InstallValidate  1400
RemoveExistingProducts  1401
InstallInitialize  1500

The installation sequence reminded me we've got a JScript, as suggested by 
Microsoft, to fix a bug in the sequencing of the installation, as described by 
them at:
 
http://connect.microsoft.com/VisualStudio/feedback/details/559575/problem-with-installing-and-removing-previous-versions-after-upgrading-my-setup-project-to-vs2010

But that's version 4.2.0. RemoveExistingProducts in 1401 for 4.3.0 looks great 
as after "InstallValidate" as is default by MajorUpgrade-element. This is 
driving me crazy. Any more ideas what could be wrong here?
 
Thank you,
 
Tom
 
> From: n...@x2systems.com
> To: wix-users@lists.sourceforge.net
> Date: Mon, 29 Jul 2013 12:31:37 +0000
> Subject: Re: [WiX-users] Remove Existing Products - Not Happening
> 
> MajorUpgrade element is a lot simpler plus you have unrelated code in this
> sample.
> 
> 
> Neil
> 
> 
> >Try the following:
> >
> >Add upgrade details just above <InstallExecuteSequence> element.
> >The following will block install if newer version detected, and will
> >remove
> >older version if detected.
> >
> >    <Upgrade Id="17652B67-2C4F-4752-88CE-0E300DEA4C2F"> <!-- YOUR UPGRADE
> >CODE -->
> >      <UpgradeVersion OnlyDetect="yes" Minimum="4.3.0"
> >Property="NEWERVERSIONDETECTED" IncludeMinimum="no" /> <!-- Minimum = YOUR
> >VERSION -->
> >      <UpgradeVersion OnlyDetect="no" Minimum="0.0.0" Maximum="4.3.0"
> >Property="OLDERVERSIONBEINGUPGRADED" IncludeMinimum="yes"
> >IncludeMaximum="yes" /> <!-- Maximum = YOUR VERSION -->
> >    </Upgrade>
> >
> > <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>
> >
> >
> >On Mon, Jul 29, 2013 at 1:52 PM, Neil Sleightholm
> ><n...@x2systems.com>wrote:
> >
> >> 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.clkt
> >>r
> >> >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.clkt
> >>rk
> >> _______________________________________________
> >> 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.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
                                          
------------------------------------------------------------------------------
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

Reply via email to