wincerapi.CreateProcess

PyHANDLE, PyHANDLE, int, int = CreateProcess(appName, commandLine , processAttributes , threadAttributes , bInheritHandles , dwCreationFlags , newEnvironment , currentDirectory , startupinfo )

Creates a new process and its primary thread. The new process executes the specified executable file.

Parameters

appName : string

name of executable module, or None

commandLine : string

command line string, or None

processAttributes : PySECURITY_ATTRIBUTES

process security attributes, or None

threadAttributes : PySECURITY_ATTRIBUTES

thread security attributes, or None

bInheritHandles : int

handle inheritance flag

dwCreationFlags : int

creation flags

newEnvironment : 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 None

startupinfo : 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)