title: Executing a custom action that requires elevation after install
body: <p>I have the following WiX snippet:</p>
  
  <pre><code>&lt;Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" /&gt;
  &lt;CustomAction Id="StartAppOnExit" 
                FileKey="Configurator.exe" 
                ExeCommand="" 
                Execute="immediate" 
                Impersonate="yes" 
                Return="asyncNoWait" /&gt;
  &lt;Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" 
            Value="Configure initial settings" /&gt;
  &lt;UI&gt;
    &lt;Publish Dialog="ExitDialog" 
             Control="Finish" 
             Order="1" 
             Event="DoAction" 
             Value="StartAppOnExit"
    &gt;WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed&lt;/Publish&gt;
  &lt;/UI&gt;
  </code></pre>
  
  <p>Basically on the exit dialog I display a box that says: launch application. Note: this application requires elevation. This all works fine except for a snag. If UAC is enabled it seems that the MSI mucks around with the user token and strips its groups, so when it tries to launch the application that requires elevation it is no longer an option.</p>
  
  <p>How do I string this together to work?</p>
  
  <p>I tried chucking an Impersonate="no", but it's too late at that point for this to work.</p>