[wix-users] Replacing newer files

Winter,Stijn S. de stijn.dewinter at student.fontys.nl
Fri Jun 10 04:22:17 PDT 2016


This works like I wanted, thanks

Kind regards,
Stijn de Winter
________________________________________
Van: wix-users <wix-users-bounces at lists.wixtoolset.org> namens James Buchan <James.Buchan at servelec-synergy.com>
Verzonden: vrijdag 10 juni 2016 12:26
Aan: WiX Toolset Users Mailing List
Onderwerp: Re: [wix-users] Replacing newer files

This should do the trick:
<Property Id="REINSTALLMODE" Value="amus"/>

But please be sure that you understand what it will do (and if/how it will impact your users).
https://msdn.microsoft.com/en-us/library/windows/desktop/aa371182(v=vs.85).aspx


James Buchan
Development Engineer

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Winter,Stijn S. de
Sent: 10 June 2016 10:56
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Replacing newer files

Okay i tried this.

But i encountered a problem:
When running the MSI which replaces the files ONLY older files will be replaced.
I made the same MSI but this time it did not replace the files, instead it only removed it. Same code for removal!
This way all files are removed.

This is ofcourse not the way I want it. Ideas?

Kind regards,
Stijn de Winter
________________________________________
Van: wix-users <wix-users-bounces at lists.wixtoolset.org> namens Phill Hogland <phill.hogland at rimage.com>
Verzonden: dinsdag 7 juni 2016 15:00
Aan: WiX Toolset Users Mailing List
Onderwerp: Re: [wix-users] Replacing newer files

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/

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

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

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



More information about the wix-users mailing list