Launching an administrative interactive process when a standard user is logged on
I have a system service which creates a helper interactive process as administrator so that it can access some desktop-related resources, including the BlockInput() function and NVIDIA's NVAPI functions, which cannot be run from a service. When the logged on user was a member of Administrators, the following worked: Set privilege levels, including SE_TCB_NAME Get active session ID with WTSGetActiveConsoleSessionId() Get logged on user from session ID with WTSQueryUserToken() GetTokenInformation() with TokenLinkedToken DuplicateTokenEx() with SecurityImpersonation Launch process with