Hiya Jacob,

Yeah, I went with number one in the end, two was too dangerous, three sounded 
like a maintenance nightmare (seeing as the 3rd party dll is likely to change 
again in the future) and I couldn't get four to work.

Cheers,

Jack

-----Original Message-----
From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com] 
Sent: 28 March 2013 15:42
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Upgrading an Install fails to downgrade a 3rd party 
library

I don't like any of these per say, but just throwing some ideas out for you to 
ponder/try.

1) Rename the file and have it in a different component
2) messing around with REINSTALLMODE to force overwrites.  (Would be very bad 
if your MSI installed any shared components)
3)  I see a hackish approach listed as an answer 
http://stackoverflow.com/questions/14122136/how-can-i-make-sure-a-downgraded-library-is-installed-by-my-msi
 where one tweaks the MSI's File table to lie about the version but I am not 
sure that I like that idea. (Also seems install shield does this 
http://stackoverflow.com/questions/5542841/how-to-force-file-replacement-on-msi-upgrade
 ) 4)A possible approach from 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/downgrading-a-file-during-an-upgrade-td3951448.html
 would be to 

              <Component Id="cmpB42F5061E6D22CE98B0C7438BC306A32" 
Guid="{CD7EE807-D48D-48FF-AE48-C53382818ABD}">
                <File Id="fil89806A85680A72004AF8F43D0B163260" KeyPath="yes" 
Source="!(wix.ToolsDir)\Apex3D.exe" />
              </Component>
              <Component Id="R_cmpB42F5061E6D22CE98B0C7438BC306A32" Guid="*" 
Transitive="yes"> 
                <RemoveFile Id="R_cmpB42F5061E6D22CE98B0C7438BC306A32"   Name=" 
Apex3D.exe" On="install"/> 
                <Condition>?cmpB42F5061E6D22CE98B0C7438BC306A32=3 AND NOT 
PATCH</Condition> 
              </Component>

-----Original Message-----
From: Jackson Pope [mailto:jackson.p...@nonlinear.com]
Sent: Thursday, March 28, 2013 9:38 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Upgrading an Install fails to downgrade a 3rd party 
library

Hiya Jacob,

It's currently the default, which is afterInstallValidate which is even earlier 
I think.

Cheers,

Jack

-----Original Message-----
From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com]
Sent: 28 March 2013 14:24
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Upgrading an Install fails to downgrade a 3rd party 
library

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&reg; 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&reg; 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

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3267 / Virus Database: 3161/6204 - Release Date: 03/25/13

------------------------------------------------------------------------------
Own the Future-Intel&reg; 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&reg; 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

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3267 / Virus Database: 3161/6204 - Release Date: 03/25/13

------------------------------------------------------------------------------
Own the Future-Intel&reg; 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

Reply via email to