title: Wix Tools update uses old custom actions
body: <p>we've discovered some strange behavior using WIX Setup Tools. 
  We have deployed some major versions (2.2.0 - to 2.2.4). For 2.2.5 we changed a small things in custom actions (before we used XCOPY, now we use RoboCopy because this has a "MOVE" command and not only a copy). </p>
  
  <p>But when we now update from 2.2.4 to 2.2.5 the setup still uses the old Copy command instead of the new MOVE Command but this can't be because 2.2.5 does not have any Copy command. 
  If I deploy a 2.2.6 (identical with 2.2.5) and update from 2.2.5 it uses the new update process...
  It looks like the update uses the old MSI.</p>
  
  <p><a href="https://stackoverflow.com/questions/16901433/re-cached-msi-still-running-old-custom-action">Found this on SO</a> </p>
  
  <p>Is there any way to prevent this behavior? This completely breaks update process as existing config files are not copied correctly on update.</p>
  
  <p>We can't force the customer to clean registry or remove any MSI files form cache by GUID...</p>
  
  <p>Any help appreciated. 
  Thanks in advance</p>
  
  <p>UPDATE:
  New Custom Action in Product.wxs</p>
  
  <pre><code>&lt;Property Id="C_TEMP" Value="C:\Temp" /&gt;
        &lt;Property Id="ROBOCOPY_EXE"&gt;robocopy.exe&lt;/Property&gt;
        &lt;CustomAction Id="CopyToTemp" Property="ROBOCOPY_EXE" Return="ignore" ExeCommand='"[INSTALLDIR]\Configuration" "[C_TEMP]\ServerSettings" ServerSettings.json' /&gt;
        &lt;CustomAction Id="CopyFromTemp" Property="ROBOCOPY_EXE" Return="ignore" ExeCommand='"[C_TEMP]\ServerSettings" "[INSTALLDIR]\Configuration" ServerSettings.json /MOVE /IS' /&gt;
  </code></pre>
  
  <p>Old Custom action </p>
  
  <pre><code>&lt;Property Id="C_TEMP" Value="C:\Temp" /&gt;
    &lt;Property Id="XCOPY_EXE"&gt;xcopy.exe&lt;/Property&gt;
    &lt;CustomAction Id="CopyToTemp" Property="XCOPY_EXE" Return="ignore" ExeCommand='"[INSTALLDIR]\Configuration\ServerSettings.json" "[C_TEMP]\ServerSettings.json.bak*" /YIR' /&gt;
    &lt;CustomAction Id="CopyFromTemp" Property="XCOPY_EXE" Return="ignore" ExeCommand='"[C_TEMP]\ServerSettings.json.bak" "[INSTALLDIR]\Configuration\ServerSettings.json*" /YIR' /&gt;
  </code></pre>
  
  <p>Afterwards the code didn't change so far</p>
  
  <pre><code>&lt;InstallExecuteSequence&gt;
    &lt;Custom Action="CopyToTemp" Before="InstallInitialize"&gt;Installed AND (NOT REMOVE="ALL" OR UPGRADINGPRODUCTCODE)&lt;/Custom&gt;
    &lt;Custom Action="CopyFromTemp" Before="SetVersionsInRegistry"&gt;NOT Installed OR Installed AND (NOT REMOVE="ALL" OR UPGRADINGPRODUCTCODE)&lt;/Custom&gt;
  
  .....
  &lt;/InstallExecuteSequence&gt;
  </code></pre>