Hey Rich,

If you make your installers set REINSTALLMODE=amus files will be overwritten 
regardless of their version. This would let you run upgrades and downgrades 
where whomever comes last wins.

http://msdn.microsoft.com/en-us/library/aa371182%28v=vs.85%29.aspx

- Joel

> On Nov 26, 2014, at 1:04 PM, Rich Fowler <richwfow...@gmail.com> wrote:
> 
> I need to allow  Downgrading installations. This is for an internal
> application where a user may need to install version "N" over version
> "N+1". Yes, I know this is frowned upon, but management insists. We need to
> make it seamless to our users. Forcing the user to first uninstall is not
> an option.
> 
> I've searched most everywhere and think I am close to getting it right.
> However, after installing version "N" over top of "N+1" only the unchanged
> files remain. It looks like the installer is determining which files to
> install before version "N+1" is removed.
> 
> Following is a stripped down installation file. The "ACMEVERSION" property
> changes from release to release as well as the file version withing the
> executable.
> After version 4.0.5.7 is installed, the directory contains two files - the
> exe and txt file. After 4.0.4.4 is installed, the directory only contains
> the txt file, which is unchanged between the versions.
> 
> Any advice or comments are deeply appreciated.
> 
> <?xml version="1.0" encoding="UTF-8"?><Wix
> xmlns="http://schemas.microsoft.com/wix/2006/wi";>      <?define
> ACMEVERSION = "4.0.04.04" ?><!--  THIS IS THE ONLY LINE THAT CHANGES
> -->      <?define UpgradeCode =
> "83ED9349-6CE8-49AF-AA9D-76A63BBF3667"?>    <Product Id="*"
> Name="MyApp" Language="1033" Version="$(var.ACMEVERSION)"
> Manufacturer="Acme" UpgradeCode="$(var.UpgradeCode)">      <Package
> InstallerVersion="405" Compressed="yes"  Manufacturer="Acme" />
> <Property Id="ALLUSERS" Value="1" />
>       <MajorUpgrade AllowDowngrades="yes"
> Schedule="afterInstallValidate" RemoveFeatures="ProductFeature" />
> <!--InstallExecuteSequence>      <RemoveExistingProducts
> After='InstallInitialize' />      <InstallExecute
> After="RemoveExistingProducts" />    </InstallExecuteSequence -->
>       <!-- Force uninstall of any previously installed version (Allow
> Upgrade AND DownGrade -->      <Property
> Id='PREVIOUSVERSIONSINSTALLED' Secure='yes' />      <Upgrade
> Id='$(var.UpgradeCode)'>      <UpgradeVersion Minimum='1.0.0.0'
> Maximum='99.0.0.0'
> Property='PREVIOUSVERSIONSINSTALLED'
> MigrateFeatures="yes" IncludeMinimum='yes' IncludeMaximum='no' />
> </Upgrade>
>     <MediaTemplate EmbedCab='yes' />
>     <Feature Id="ProductFeature" Title="MyApp"
> Level="1">                    <ComponentGroupRef Id="ProductComponents"
> />            </Feature>      </Product>    <!-- we want to install into 
> C:\Acme\
> -->   <Fragment>    <Directory Id="TARGETDIR" Name="SourceDir">
> <Directory Id="ACMEINSTALLFOLDER" Name="Acme" />    </Directory>
> <SetDirectory Id="TARGETDIR" Value="[WindowsVolume]" />  </Fragment>
>       <Fragment>              <ComponentGroup Id="ProductComponents" >      
> <Component
> Id="AcmeAppComponent" Guid="304961E1-C871-4124-A802-76EFBA17E3A6"
>            Directory="ACMEINSTALLFOLDER" >        <RemoveFile
> Id="RmvFile" Name="AcmeApp.exe" On="install" />        <File
> Id="AcmeEXE" Name="AcmeApp.exe"
> Source="..\$(var.ACMEVERSION)\AcmeApp.exe" />      </Component>
> <Component Id="DocumentComponent"
> Guid="AD9DED34-7158-454E-8A3C-A9FC04F28621"
> Directory="ACMEINSTALLFOLDER" >        <File Id="NOTES"
> Name="Notes.txt"  KeyPath="yes" />      </Component>
> </ComponentGroup>     </Fragment></Wix>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&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