Re: CreateProcessWithLogonW error



> Well, when using the API CreateProcessAsUser() does not succeed,
> and the function GetLastError() returns the error code # 1314,
> which is ERROR_PRIVILEGE_NOT_HELD, this is usually because the
> user's token does not have the needed access rights, which are the:
>
> TOKEN_QUERY,
> TOKEN_DUPLICATE,
> TOKEN_ASSIGN_PRIMARY.
>
> Moreover, the process that calls the API CreateProcessAsUser() must
> have
> following privileges:
>
> SE_ASSIGNPRIMARYTOKEN_NAME
> SE_INCREASE_QUOTA_NAME
>

How do you set these access rights and priviledges?

Thanks,

A


.