I\'ve been attempting to create a new process under the context of a specific user using the CreateProcessAsUser
function of the Windows API, but seem to be run
From here:
Typically, the process that calls the CreateProcessAsUser function must have the SE_ASSIGNPRIMARYTOKEN_NAME and SE_INCREASE_QUOTA_NAME privileges. If this function fails with ERROR_PRIVILEGE_NOT_HELD (1314), use the CreateProcessWithLogonW function instead. CreateProcessWithLogonW requires no special privileges, but the specified user account must be allowed to log on interactively. Generally, it is best to use CreateProcessWithLogonW to create a process with alternate credentials.
See this blog post How to call CreateProcessWithLogonW & CreateProcessAsUser in .NET