title: How to call LogonUser() to get a non-restricted full token inside a Windows Service with UAC enabled?
body: <p>I am running a WindowsService on Windows Server 2012 and it needs to impersonate a domain admin user (who is also added to the local administrators group on the machine).</p>
  
  <p>UAC is enabled on the system and Calling LogonUser using the credentials with a LogonType of LOGON32_LOGON_INTERACTIVE, seems to return a restricted token instead of a full token. </p>
  
  <p>This is causing the administrative task i'm trying to do to fail. </p>
  
  <p>What is the right way to call LogonUser in this situation so that a full token is returned instead of an restricted token?</p>
  
  <p>PS: I came across a related question here <a href="https://stackoverflow.com/questions/5098121/how-can-i-get-elevated-permissions-uac-via-impersonation-under-a-non-interacti">How can I get elevated permissions (UAC) via impersonation under a non-interactive login?</a> 
  but it does not show the exact calls that need to be made to get the full token. </p>