title: COPYFILE post MSI Installation Using WIX
body: <p>Please see below statements; for time being I have hard coded source and destination folders (this folders are formed during Installation process) in setup project of MSI. Note: Below file paths are the one where MSI package installation destination are and not the source location from. The question how to set the destination or source property values by hiding the hard coded values like [INSTALLLOCATION]\App_Config\</p>
  
  <p>As of now I am passing INSTALLLOCATION (E:\Websites\SCBUDirect\Website\SCBUDirect.B2CWeb) through command line and want to set the Destination folder value as [INSTALLLOCATION]\App_Config\ but not sure how it can be implemented through property setting or custom actions which I tried but failed to make it work.</p>
  
  <p>Below is the Snippet (from heat.exe) of component of the file which need to be copied . </p>
  
  <pre><code>&lt;Component Id="cmp209B0DBB82F9FF15193D29F0BD337B7F" Directory="dirB0A921E55A598C65B18B4E47885629C3" Guid="{3B140259-FCC7-4D2E-8629-CBB879BBA46C}"&gt;
    &lt;File Id="filBC5CC5B8DCC504F6DC75A7B2673E7D0D" KeyPath="yes" Source="C:\Workspaces\Chatra\Website\SCBUDirect.B2CWeb\App_Config\basic.log4net.dev" /&gt;
  &lt;/Component&gt;
  </code></pre>
  
  <p>Here is my part of my code in product.wxs</p>
  
  <pre><code>&lt;Fragment&gt;
      &lt;Property Id="SourceFilesFolder" Value="E:\Websites\SCBUDirect\Website\SCBUDirect.B2CWeb\App_Config\basic.log4net.dev" /&gt;
  
      &lt;Property Id="DestFilesFolder" Value="E:\Websites\SCBUDirect\Website\SCBUDirect.B2CWeb\App_Config\" /&gt;
  
  
    &lt;ComponentGroup Id="CopyFiles"&gt;
           &lt;ComponentRef Id="CMP_LOG4TXT" /&gt;
      &lt;/ComponentGroup&gt;
  
        &lt;Component Id="CMP_LOG4TXT" Guid="341BD660-7249-42DD-9744-DBEF0776AD52"  Directory="INSTALLLOCATION" KeyPath="yes"&gt;
          &lt;CopyFile Id="Copy_LOG4TXT" 
                SourceProperty="SourceFilesFolder" 
                DestinationProperty="DestFilesFolder" 
                DestinationName="basic.log4net" /&gt;
        &lt;/Component&gt;
  
  &lt;/Fragment&gt;
  </code></pre>