Hi,
I am trying to log on another interactive user (along with its
shell/desktop) and ran into some difficulties.
Basically I would assume I'd first need to create a new window station
using CreateWindowStation() along with a new desktop with
CreateDesktop(), then logon the user with LogonUser() following loading
the user's shell (which would usually be the Explorer) with
CreateProcessAsUser(). Is this outline more or less correct or did I
miss something?
Given this procedure would be right I encountered several issues I am
wondering about
1) CreateProcessAsUser() doesnt seem to be supported for normal accounts
as it always returns ERROR_PRIVILEGE_NOT_HELD (I read on some Windows
versions LogonUser() fails as well). The workaround
CreateProcessWithLogonW() mentioned by MSDN is reported not to work for
the SYSTEM account on the other hand (not that I would see why the
function needed to be introduced). More information about this issue is
mentioned at
http://f6cb1.sliceurl.com. Is there any "easy" way to
create a process as another user from any account without any tricks?