[wix-users] Replacing newer files

Phill Hogland phill.hogland at rimage.com
Tue Jun 7 06:00:41 PDT 2016


First it would be good to clarify that this is not a wix behavior but defined behavior of MSI.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368599(v=vs.85).aspx

There may be other approaches to this issue depending on your exact requirements, but when I need to 'always overwrite' a file I use the following pattern:

      <Component Id="someid" Directory="myDir" >
        <!-- Always Overwrite pattern, otherwise file copy is skipped for unversioned-modified file. . -->
        <RemoveFile Id="remove_fileid" Name="file.ext" On="install" />
        <File Id="fileid" Source="!(bindpath.name)\file.ext" />
      </Component>

I do this rarely, but I do have a scenario where this pattern is used.
________________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Winter,Stijn S. de <stijn.dewinter at student.fontys.nl>
Sent: Tuesday, June 7, 2016 7:10:00 AM
To: WiX Toolset Users Mailing List
Subject: [wix-users] Replacing newer files

Hello All,


My installer has to replace some files, some files are newer than the one it will be replaced with.

WiX seems to refuse to do this. Can I force WiX to overwrite existing files?


Kind regards,

Stijn de Winter


==========================================================
Op deze e-mail zijn de volgende voorwaarden van toepassing:
http://www.fontys.nl/disclaimer
The above disclaimer applies to this e-mail message.

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list