A repair (or a patch and other in place updates) will not replace a modified file. It's assumed to hold data that was added by the user after it had been installed and Windows doesn't usually like to destroy user data.
As has been said, repair is nothing to do with upgrade. Why are you connecting them? You may have a mistaken assumption about upgrades and repairs. If you want to update the files in your product then use an upgrade; a repair is typically an emergency measure when the installed product is incorrect and a repair can fix it, often automatically. A fairly common design for your situation is to use the file installed by the MSI as a template, and a copy can be made to its working location where it is not under the control of MSI, and reinitializing the file to its base version is a function of the app. --------------- Phil Wilson On Thu, Jun 5, 2014 at 2:19 AM, Nikhil Agrawal (Tata Consultancy Services) <v-nia...@microsoft.com> wrote: > Hi Pavan, > > Below is my code where I added the node, but it still does not replace the > edited file under the repair version. > > <Directory Id="TARGETDIR" Name="SourceDir"> > <Directory Id="ProgramFilesFolder"> > <Directory Id="INSTALLDIR" Name="Microsoft Azure Cost Estimator > Tool"> > <Component Id="ApplicationFiles" > Guid="fasd-dasd-4BAE-dased-asdfasdf" KeyPath="yes"> > <File Id="ApplicationFile1" Source="abc.exe" /> > > > -----Original Message----- > From: Pavan Konduru [mailto:pavan.kond...@accelrys.com] > Sent: 05 June 2014 03:06 > To: General discussion about the WiX toolset. > Subject: Re: [WiX-users] Replacing all the files forcefully with repair. > > Repair has nothing to do with upgrade. During repair you are usually running > the same install to repair broken files or replace files. > If you want to replace the files make sure to use Keypath="yes" in the > component where you declare all your files. Setting it to "no" will not > replace it. > > --Pavan > > -----Original Message----- > From: Nikhil Agrawal (Tata Consultancy Services) > [mailto:v-nia...@microsoft.com] > Sent: Wednesday, June 04, 2014 3:07 AM > To: WiX-users@lists.sourceforge.net > Subject: [WiX-users] Replacing all the files forcefully with repair. > > We made a MSI installer with WIX. It installs some files into a directory > created in 'Program Files', and all works fine. However, if I change (with a > text editor) a file that has been installed and then attempt to repair the > product, the file is not repaired, i.e. it is not replaced by an original > version provided in MSI. > > Then I went through the below link, > http://technet.microsoft.com/en-us/library/cc759262%28v=ws.10%29.aspx?ppud=4#BKMK_Repair > > It shows the command line options as /fa to do this and it works. How can I > implement it in my WXS file. Below is my code for upgrade, <Upgrade > Id="$(var.ProductUpgradeCode)"> > <UpgradeVersion Minimum="$(var.ProductVersion)" OnlyDetect="yes" > Property="NEWERVERSIONDETECTED"/> > <UpgradeVersion Minimum="0.0.0" Maximum="$(var.ProductVersion)" > IncludeMinimum="yes" IncludeMaximum="no" > Property="OLDERVERSIONBEINGUPGRADED"/> > </Upgrade> > <Condition Message="A newer version of this software is already > installed.">NOT NEWERVERSIONDETECTED</Condition> > > On repair we would like to replace all the files in the folder with the one > in MSI. > > Thanks, > Nikhil. > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the > definitive new guide to graph databases and their applications. Written by > three acclaimed leaders in the field, this first edition is now available. > Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the > definitive new guide to graph databases and their applications. Written by > three acclaimed leaders in the field, this first edition is now available. > Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/NeoTech > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users