I add <RemoveFile> but on uninstall. This gave me the same "error" do you usually specify "both" for this kind of situation?
Kevin Burton Senior Software Engineer BUYSEASONS 262-901-2000 Office 262-901-2312 Fax kev...@buyseasons.com -----Original Message----- From: Chad Petersen [mailto:chad.peter...@harlandfs.com] Sent: Wednesday, April 13, 2011 2:25 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] WiX force copy file. Yes. I run into this with text files (xml mostly) a lot. RemoveFile can go under the same Component as the File element. That's the way I always use it. -----Original Message----- From: Kevin Burton [mailto:kev...@buyseasons.com] Sent: Wednesday, April 13, 2011 12:21 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] WiX force copy file. The log file looks like: MSI (s) (6C:EC) [13:54:36:297]: Executing op: FileCopy(SourceName=dfl-c3lj.con|app.Config,SourceCabKey=FILE_ServiceApp Config,DestName=app.Config,Attributes=512,FileSize=32206,PerTick=32768,, VerifyMedia=1,,,,,CheckCRC=0,,,InstallMode=58982400,HashOptions=0,HashPa rt1=-680126199,HashPart2=1248668224,HashPart3=-1650872411,HashPart4=1522 490087,,) MSI (s) (6C:EC) [13:54:36:297]: File: D:\Program Files (x86)\BsiServices\ServiceHost\app.Config; Won't Overwrite; Won't patch; Existing file is unversioned but modified I will look at RemoveFile. It seems kind of counter intuitive that on installation I want to remove a file. Would I put the <RemoveFile> element in the same component as the component that is installing the file? -----Original Message----- From: Chad Petersen [mailto:chad.peter...@harlandfs.com] Sent: Wednesday, April 13, 2011 2:05 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] WiX force copy file. Check a verbose log file and it should say why it is not replacing that file. Typically because it is newer than the file you hope to replace it with. The RemoveFile element can be handy for some of these types of issues. Not positive it's what you'll want, but maybe. -----Original Message----- From: Kevin Burton [mailto:kev...@buyseasons.com] Sent: Wednesday, April 13, 2011 11:37 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] WiX force copy file. Here is the situation. I have a configuration file that on installation in release mode I use the XmlFile task to remove a section of the file. In debug I also use XmlFile to modify one of the elements in the file. Is what I am finding is that if I do a release installation followed by a debug installation the element that I am looking for is not found and the installation fails. If I look at the configuration file the section is missing. I was expecting the whole file to be copied to the installation folder (overwriting the release edited file) before I try the debug editing but apparently that is not happening. Is there some rule within WiX that it will not overwrite a file if it exists? If so can I override this behavior? The applicable WiX code looks like: <Component Id="CMP_WpfAppConfig" Guid="*" Directory="WPFINSTALLDIR"> <File Id="FILE_WpfAppConfig" Source="../WPFHost/app.Config" KeyPath="yes"/> . . . . . <?if $(var.Configuration) = "Debug" ?> <util:XmlFile Id="WpfAppConfig14" File="[WPFINSTALLDIR]app.Config" Action="setValue" Name="initializeData" Value="f:\applog\app_tracelog.svclog" ElementPath="//configuration/system.diagnostics/sharedListeners/add[\[]@ name="ServiceModelTraceListener"[\]]" Sequence="14" /> <?endif ?> <?if $(var.Configuration) = "Release" ?> <util:XmlConfig Id="WpfAppConfig15" Action="delete" ElementPath="//configuration" File="[WPFINSTALLDIR]app.Config" Node="element" On="install" Sequence="15" VerifyPath="system.diagnostics" /> <util:XmlConfig Id="WpfAppConfig16" Action="delete" ElementPath="//configuration/system.serviceModel" File="[WPFINSTALLDIR]app.Config" Node="element" On="install" Sequence="16" VerifyPath="diagnostics" /> <?endif ?> Thank you. Kevin Burton Senior Software Engineer BUYSEASONS 262-901-2000 Office 262-901-2312 Fax kev...@buyseasons.com<mailto:kev...@buyseasons.com> ------------------------------------------------------------------------ ------ Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------ ------ Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------ ------ Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users