The attribute is called DefaultVersion, although if the component is shared with other installers you might be better off going with Mike's suggestion about companion files.
Rob On 24/08/2011 20:01, The Eligible Bachelors wrote: > I do not know how to "specify a version on the File element" as I do not see > a version addtibute in the File element. > > However I have noticied the following... I do have a version specified in the > Product element. If the version increases, the new file will replace the old > one. > > However, I do not want this to be version specific. If I install the same > version installer I would like it to overwrite the installed file. > > > > > ----- Original Message ----- > From: Rob Hamflett<r...@snsys.com> > To: wix-users@lists.sourceforge.net > Cc: > Sent: Thursday, August 18, 2011 8:17 AM > Subject: Re: [WiX-users] Replace component on reinstall > > You could try specifying a version on the File element. I think that will > cause Windows Installer > to always replace the unversioned file on disk with what it thinks is a > versioned file. > > Rob > > On 17/08/2011 16:30, The Eligible Bachelors wrote: >> Hello, >> >> I would like to have a component that does not get removed at uninstall. >> However, if I uninstall and install again, I would like the file to be >> replaced with the one in the installer. Here is my code: >> >> >> <Component Id="PrefsFileComponent" Guid="*" Permanent="yes" >> NeverOverwrite="no"> >> <File Id="PrefsXML" Name="preferences.xml" >> Source="$(var.RESOURCES)\preferencesServeDirectories.xml" KeyPath="yes" /> >> </Component> >> >> The problem is when I install and uninstall, then edit this >> "preferences.xml" file. If I do the install, I would like my XML edits to be >> removed since the installer should replace the file with the one in the MSI. >> However, it is not getting replaced. >> >> I am using Win 7, Wix 3.5 >> >> Thanks. >> >> -Jono >> >> ------------------------------------------------------------------------------ >> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, >> user administration capabilities and model configuration. Take >> the hassle out of deploying and managing Subversion and the >> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users