PyHANDLE, PyHANDLE, int, int = CreateProcessAsUser(hToken, appName
, commandLine
, processAttributes
, threadAttributes
, bInheritHandles
, dwCreationFlags
, newEnvironment
, currentDirectory
, startupinfo
)
Creates a new process in the context of the specified user.
Parameters
hToken : PyHANDLE
Handle to a token that represents a logged-on userappName : string
name of executable module, or NonecommandLine : string
command line string, or NoneprocessAttributes : PySECURITY_ATTRIBUTES
process security attributes, or NonethreadAttributes : PySECURITY_ATTRIBUTES
thread security attributes, or NonebInheritHandles : int
handle inheritance flagdwCreationFlags : int
creation flagsnewEnvironment : None
A dictionary of stringor Unicode pairs to define the environment for the process, or None to inherit the current environment.currentDirectory : string
current directory name, or Nonestartupinfo : PySTARTUPINFO
a STARTUPINFO object that specifies how the main window for the new process should appear.Comments
The result is a tuple of (hProcess, hThread, dwProcessId, dwThreadId)