title: WiX Remove files on uninstall but not update
body: <p>I have an app that can log when given the correct flags at install time (<code>/logLevel=debug</code> on install gets passed to the app when the service starts). Our update process is a automated uninstall then install with a new MSI package. I know there is built in patch functionality with WiX, but this is our process.</p>
  
  <p>Similarly with the <code>logLevel</code> parameter, I'd like to pass something to the effect of <code>UPDATE="true"</code> on the command line during uninstall. When this parameter is passed to the uninstaller it should <em>not</em> delete the log files. Currently we delete the files every time, but would like to retain the log files during an update. This is what I am trying to extend as of right now:</p>
  
  <pre><code>&lt;?if $(var.BUILD_CONFIG) = "Debug" ?&gt; 
  &lt;?else?&gt;
    &lt;CustomAction Id="Cleanup_logfile" Directory="TempTest"
     ExeCommand="cmd /C &amp;quot;del %systemroot%\temp\hexis_hawkeye_g.log.*&amp;quot;"
     Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" /&gt;
  
    &lt;InstallExecuteSequence&gt;
      &lt;Custom Action="Cleanup_logfile" Before="RemoveFiles" &gt;
        REMOVE="ALL"
      &lt;/Custom&gt;
    &lt;/InstallExecuteSequence&gt; 
  &lt;?endif?&gt; 
  </code></pre>
  
  <p>And I've been playing with code similar to something like the following but it doesn't seem to work:</p>
  
  <pre><code>&lt;?if $(var.BUILD_CONFIG) = "Debug" ?&gt; 
  &lt;?else?&gt;
    &lt;?if '[UPDATE]' = "true" ?&gt;
    &lt;?else?&gt;
      &lt;CustomAction Id="Cleanup_logfile" Directory="TempTest"
       ExeCommand="cmd /C &amp;quot;del %systemroot%\temp\hexis_hawkeye_g.log.*&amp;quot;"
       Execute="deferred" Return="ignore" HideTarget="no" Impersonate="no" /&gt;
  
      &lt;InstallExecuteSequence&gt;
        &lt;Custom Action="Cleanup_logfile" Before="RemoveFiles" &gt;
          REMOVE="ALL"
        &lt;/Custom&gt;
      &lt;/InstallExecuteSequence&gt; 
    &lt;?endif?&gt;
  &lt;?endif?&gt;
  </code></pre>
  
  <p>I'm not sure if I'm not initializing the <code>UPDATE</code> variable correctly, or if this really is some pre-processing that cannot be implemented in this fashion. I would think it would not work because these constructs are described on the preprocessor doc page, however, the <code>/logLevel</code> and various other parameters seem to work fine at run-time installation. I'm totally WiX illiterate and have been trying to read their documentation to no avail, any helpful links appreciated.</p>