You could try scheduling remove existing products earlier, after InstallInitialize.
-----Original Message----- From: Jackson Pope [mailto:jackson.p...@nonlinear.com] Sent: Thursday, March 28, 2013 3:28 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Upgrading an Install fails to downgrade a 3rd party library Hiya all, Similar to this question on StackOverflow (http://stackoverflow.com/questions/4227456/windows-installer-deletes-versioned-file-during-product-upgrade-instead-of-down) I've got a new version of an install that accesses an old version of a 3rd party library. Previous version (1.0) references Apex3D.exe version 3.0.7 New version (1.1) references Apex3D.exe version 2.96 This is a downgrade by a 3rd party, and we want the upgrade from v1.0 to v1.1 to replace Apex version 3.0.7 with Apex version 2.96. It doesn't. It deletes version 3.0.7 and doesn't install version 2.96. Relevant bits of the .wxs file: <MajorUpgrade DowngradeErrorMessage="Blah." AllowDowngrades="no" AllowSameVersionUpgrades="yes"/> <Component Id="cmpB42F5061E6D22CE98B0C7438BC306A32" Guid="{CD7EE807-D48D-48FF-AE48-C53382818ABD}"> <File Id="fil89806A85680A72004AF8F43D0B163260" KeyPath="yes" Source="!(wix.ToolsDir)\Apex3D.exe" /> </Component> If I add the Schedule="afterInstallExecute" attribute to the MajorUpgrade node then the 3.0.7 version remains (instead of the version I want). I've also tried changing the Component Id and GUID attribute and the File Id attribute without it helping, and even adding a RemoveFile node before the File node in the component (as described here: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Using-wix-how-to-always-overwrite-a-file-td6904118.html). The relevant bits of the verbose msiexec log are: MSI (c) (E0:60) [16:52:35:610]: Note: 1: 2228 2: 3: MsiAssembly 4: SELECT `MsiAssembly`.`Attributes`, `MsiAssembly`.`File_Application`, `MsiAssembly`.`File_Manifest`, `Component`.`KeyPath` FROM `MsiAssembly`, `Component` WHERE `MsiAssembly`.`Component_` = `Component`.`Component` AND `MsiAssembly`.`Component_` = ? MSI (c) (E0:60) [16:52:35:770]: Disallowing installation of component: {79D3B0FF-D062-4452-9351-1A90089709AA} since the same component with higher versioned keyfile exists Action ended 16:52:43: CostFinalize. Return value 1. MSI (c) (E0:60) [16:52:43:354]: Doing action: MigrateFeatureStates Action start 16:52:43: MigrateFeatureStates. MSI (c) (E0:60) [16:52:43:355]: Migrating feature settings from product(s) '{01C34727-654C-4F0D-9EFB-29ABC365E4BD}' MSI (c) (E0:60) [16:52:43:358]: MigrateFeatureStates: based on existing product, setting feature 'ApplicationFeature' to 'Local' state. MSI (s) (04:60) [16:53:01:572]: Executing op: ComponentRegister(ComponentId={79D3B0FF-D062-4452-9351-1A90089709AA},KeyPath=C:\Program Files (x86)\...\Apex3D.exe,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0) ... MSI (s) (04:60) [16:52:58:374]: Disallowing installation of component: {79D3B0FF-D062-4452-9351-1A90089709AA} since the same component with higher versioned keyfile exists ... MSI (s) (04:34) [16:52:59:434]: Executing op: UnregisterSharedComponentProvider(Component={79D3B0FF-D062-4452-9351-1A90089709AA},ProductCode={01C34727-654C-4F0D-9EFB-29ABC365E4BD}) MSI (s) (04:34) [16:52:59:434]: Executing op: ComponentUnregister(ComponentId={79D3B0FF-D062-4452-9351-1A90089709AA},,BinaryType=0,) ... MSI (s) (04:34) [16:53:00:706]: Executing op: FileRemove(,FileName=Apex3D.exe,,ComponentId={79D3B0FF-D062-4452-9351-1A90089709AA}) ... MSI (s) (04:60) [16:53:01:572]: Executing op: ComponentRegister(ComponentId={79D3B0FF-D062-4452-9351-1A90089709AA},KeyPath=C:\Program Files (x86)\...\Apex3D.exe,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=0) Any ideas how I can get this to work without faking the file version to be higher than 3.0.7? I don't want to have to remember to update the fake version number every time with release the product. Cheers, Jack ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users