My syntax is a bit different than yours, but you might try removing the
[WPFINSTALLDIR] property from your <RemoveFile> element. But, I always
nest my Components under a <Directory> element, so our approach is
somewhat different.

-----Original Message-----
From: Kevin Burton [mailto:kev...@buyseasons.com] 
Sent: Wednesday, April 13, 2011 12:54 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] WiX force copy file.

I cannot seem to get RemoveFile to work. Here is my latest attempt:

      <Component Id="CMP_WpfAppConfig" Guid="*"
Directory="WPFINSTALLDIR">
        <File Id="FILE_WpfAppConfig"
              Source="../WPFHost/app.Config"
              KeyPath="yes"/>
        <RemoveFile Id="WpfAppConfig0" Name="[WPFINSTALLDIR]app.Config"
On="both"/>
.....
        <!--
        -->
        <?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=&quot;ServiceModelTraceListener&quot;[\]]" 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 ?>
.....
      </Component>

I still get the error message in the log below. The error message
indicates that the file is unversioned but modified. Hopefullly applying
<RemoveFile> correctly will let me essentially overwrite the file.

Thank you.

-----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?


------------------------------------------------------------------------
------
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



------------------------------------------------------------------------------
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

Reply via email to