[wix-users] Force overwrite of specific binaries that have a lower version than the previous version installed (doing upgrade)

Nir Bar nir.bar at panel-sw.com
Sat Jun 18 23:01:24 PDT 2022


You can use my WiX extension to overwrite a specific file. It is implemented by setting the file version to the highest possible in the File table of the MSI on runtime:

https://www.nuget.org/packages/PanelSwWixExtension/

<File ...>

  <panelsw:ForceVersion />

</File>


--

Nir Bar

WiX Expert







---- On Wed, 15 Jun 2022 22:03:48 +0300 Steven Ogilvie via wix-users <wix-users at lists.wixtoolset.org> wrote ----



Which would be safer to use? 
scheduling RemoveExistingProducts earlier or using REINSTALLMODE=dmus? 
Steve 
 
From: Hoover, Jacob <mailto:Jacob.Hoover at greenheck.com> 
Sent: June 15, 2022 2:05 PM 
To: WiX Toolset Users Mailing List <mailto:wix-users at lists.wixtoolset.org> 
Cc: Steven Ogilvie <mailto:stogilvie at genetec.com> 
Subject: RE: Force overwrite of specific binaries that have a lower version than the previous version installed (doing upgrade) 
 
Schedule RemoveExistingProducts earlier? Ex: Before='InstallInitialize' 
 
From: wix-users <mailto:wix-users-bounces at lists.wixtoolset.org<mailto:mailto:wix-users-bounces at lists.wixtoolset.org>> On Behalf Of Steven Ogilvie via wix-users 
Sent: Wednesday, June 15, 2022 10:47 AM 
To: mailto:wix-users at lists.wixtoolset.org<mailto:mailto:wix-users at lists.wixtoolset.org> 
Cc: Steven Ogilvie <mailto:stogilvie at genetec.com<mailto:mailto:stogilvie at genetec.com>> 
Subject: [wix-users] Force overwrite of specific binaries that have a lower version than the previous version installed (doing upgrade) 
Importance: High 
 
Hello, 
 
I remember doing this 'fix' in a previous company but for the life of me I can't remember what was done. 
 
Background: 
 
Client installs version 1.0.0.0<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2F1.0.0.0%2F&data=05%7C01%7Cstogilvie%40genetec.com%7C0e01cbcac4ea466f38e508da4ef9a025%7C7ba8d2fb46604a19802e4d015a17e167%7C0%7C0%7C637909131793445267%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=CL6tLRyND2rqhvSY%2FcShWwmD3wpDRDV8PU65wBssp3g%3D&reserved=0> of product, a couple of DLL's are version 5.0.20.0<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2F5.0.20.0%2F&data=05%7C01%7Cstogilvie%40genetec.com%7C0e01cbcac4ea466f38e508da4ef9a025%7C7ba8d2fb46604a19802e4d015a17e167%7C0%7C0%7C637909131793445267%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=3DCbhgRt4lOhmykp7imA7srtYxdZ3DfWrmY2cLPvE4U%3D&reserved=0> (not our DLL's) 
 
Then client upgrades to version 1.1.0.0<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2F1.1.0.0%2F&data=05%7C01%7Cstogilvie%40genetec.com%7C0e01cbcac4ea466f38e508da4ef9a025%7C7ba8d2fb46604a19802e4d015a17e167%7C0%7C0%7C637909131793601484%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=E3FAow%2B%2FWW4pCfDMP7X8rzMLD4NzjLXeT00LqHrg7qc%3D&reserved=0> of our product, but a couple of the DLL's are version 5.0.17.0<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2F5.0.17.0%2F&data=05%7C01%7Cstogilvie%40genetec.com%7C0e01cbcac4ea466f38e508da4ef9a025%7C7ba8d2fb46604a19802e4d015a17e167%7C0%7C0%7C637909131793601484%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=tofddgtBmxKuv5%2FBjLYA8V99Tm2aDANsFNulN8qL%2Fa0%3D&reserved=0> (not our DLL's) and the 2 DLL's are not copied over (our upgrades are major upgrades, i.e. uninstall old, install 
 new). 
 
A few of our MSI's in other products we are using InstallShield, and in InstallShield you can right click on a file and select from the Properties dialog "Always overwrite" checkbox which forces the file to be overwritten regardless of version or date. 
 
Solution: ? 
 
However, you can't really do that in WiX, I think the only way to 'fix' the issue is to change: 
 
REINSTALLMODE=omus (default) to either 
REINSTALLMODE=amus or REINSTALLMODE=dmus 
 
Is this the *ONLY* available workaround? 
 
Thank you, 
 
Steve 
 
 
Steven Ogilvie 
Software Developer, SCMT - Builds & Installers 
 
Confidentiality Message * This e-mail message is confidential, may be privileged and is intended for the exclusive use of the addressee. Any other person is strictly prohibited from disclosing, distributing or reproducing it. If the addressee cannot be reached or is unknown to you, please inform the sender by return e-mail immediately and delete this e-mail message and destroy all copies. 
 
 
____________________________________________________________________ 
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/<https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=05%7C01%7Cstogilvie%40genetec.com%7C0e01cbcac4ea466f38e508da4ef9a025%7C7ba8d2fb46604a19802e4d015a17e167%7C0%7C0%7C637909131793601484%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000%7C%7C%7C&sdata=%2BXt%2FEssxxRG9SgrvPd9TWSXU9%2FKK6ZpA4RHrrL9CB5Y%3D&reserved=0> 
NOTE: This email was received from an external source. Please use caution when opening links or attachments in the message. 
 
____________________________________________________________________ 
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list