title: WiX, UAC, managed custom action and impersonation
body: <p>I have built a Windows Installer package using WiX 3.6 that embeds a custom managed (C#) action.</p>
  
  <p>At this stage, the installation requires that</p>
  
  <ol>
  <li>The installer be run using a specific local administrator account (in this case, the SharePoint installer account, which is a local administrator)</li>
  <li>User Account Control be disabled</li>
  </ol>
  
  <p>There really isn't a way I can bypass requirement #1, because the managed action can only perform certain steps if it runs in the context of the SharePoint installer account.</p>
  
  <p>I would like to remove requirement #2 and let the installer properly run even if UAC is enabled.</p>
  
  <p>I've researched the issue quite extensively but still can't get it to work. I have set <strong>InstallScope="perMachine"</strong> in my package, which seems to properly prompt for UAC elevation, but the installer still fails with the infamous 2869 error.</p>
  
  <p>The main problem is that my custom action is configured with <strong>Impersonate="yes"</strong> because it has to run in the context of the current user, not the local administrator account. When I search online, almost all "fixes" point to <strong>Impersonate="no"</strong> in the custom action, but that's not an option for me.</p>
  
  <p>My question therefore is: is there a way to run a custom managed action with the identity of the current user without requiring UAC to be completely disabled?</p>