win32service.CreateService

PySC_HANDLE/(PySC_HANDLE, int) = CreateService(scHandle, name , displayName , desiredAccess , serviceType , startType , errorControl , binaryFile , loadOrderGroup , bFetchTag , serviceDeps , acctName , password )

Creates a new service.

Parameters

scHandle : PySC_HANDLE

handle to service control manager database

name : PyUnicode

Name of service

displayName : PyUnicode

Display name

desiredAccess : int

type of access to service

serviceType : int

type of service

startType : int

When/how to start service

errorControl : int

severity if service fails to start

binaryFile : PyUnicode

name of binary file

loadOrderGroup : PyUnicode

name of load ordering group , or None

bFetchTag : int

Should the tag be fetched and returned? If TRUE, the result is a tuple of (handle, tag), otherwise just handle.

serviceDeps : [PyUnicode,...]

sequence of dependency names

acctName : PyUnicode

account name of service, or None

password : PyUnicode

password for service account , or None