How to call LogonUser() to get a non-restricted full token inside a Windows Service with UAC enabled?
问题 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). 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. This is causing the administrative task i'm trying to do to fail. What is the right way to call LogonUser in this situation so that a full token