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 : string

Name of service

displayName : string

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 : string

name of binary file

loadOrderGroup : string

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 : [string,...]

sequence of dependency names

acctName : string

account name of service, or None

password : string

password for service account , or None