win32_create_service
Parametry
detailsAn array of service details:
serviceThe short name of the service. This is the name that you will use to control the service using the net command. The service must be unique (no two services can share the same name), and, ideally, should avoid having spaces in the name.
displayThe display name of the service. This is the name that you will see in the Services Applet.
userThe name of the user account under which you want the service to run. If omitted, the service will run as the LocalSystem account. If the username is specified, you must also provide a password.
passwordThe password that corresponds to the
user.pathThe full path to the executable module that will be launched when the service is started. If omitted, the path to the current PHP process will be used.
paramsCommand line parameters to pass to the service when it starts. If you want to run a PHP script as the service, then the first parameter should be the full path to the PHP script that you intend to run.
load_orderControls the load_order. This is not yet fully supported.
svc_typeSets the service type. If omitted, the default value is WIN32_SERVICE_WIN32_OWN_PROCESS. Don't change this unless you know what you're doing.
start_typeSpecifies how the service should be started. The default is WIN32_SERVICE_AUTO_START which means the the service will be launched when the machine starts up.
error_controlInforms the SCM what it should do when it detects a problem with the service. The default is WIN32_SERVER_ERROR_IGNORE. Changing this value is not yet fully supported.
machineThe optional machine name on which you want to create a service. If omitted, it will use the local machine.
Przykłady
| Poprzedni | Spis treści | Następny |
| win32service Functions | Początek rozdziału |