Re: CreateProcessWithLogonW error
> Windows XP SP2 and Windows Server 2003: You cannot call
> CreateProcessWithLogonW from a process that is running under the
> LocalSystem account, because the function uses the logon SID in the caller
> token, and the token for the LocalSystem account does not contain this
> SID. As an alternative, use the CreateProcessAsUser and LogonUser
Yes, this seems to explain the failure. I'll try with CreateProcessAsUser.
- Re: Create process as user
... On Win2K+ under LocalSystem account you can use WTSQueryUserToken and ... CreateProcessAsUser, but that is "current user" if there are multiple ... Vadim. ...
- Re: Logging on a user
... I didnt mention it in my original posting but in the immediate follow up as well as on the website I referred to. ... Sorry, my fault, obviously CreateProcessAsUser() actually does work under SYSTEM. ... Starting Notepad however from a CreateProcessAsUserapplication (which itself was started from a SYSTEM console) shows a basic window frame, but the application itself does not react. ... Did you adjust the DACLs of the winsta and the desktop so it now contains the new prinicipal or the logon SID in a new ACE with appropriate access rights? ...
- Re: CreateProcessWithLogonW on Server 2003
... I have a similar problem and have looked on LogonUser and CreateProcessAsUser but I can't find out how to write the code. ... > If the caller is local system, you can use LogonUser and CreateProcessAsUser ...