The Service variable is used to: The Service variable includes the following elements: | | | Element | Type | Effect |
---|
Service.Startup | Integer constant | Service start mode:- serviceStartupAutomatic: Automatic startup once the system is initialized.
- serviceStartupDisabled: The service is disabled. Any attempt to start it triggers an error.
- serviceStartupManual: Manual start (with ServiceStart for example).
- serviceStartupSystem: Automatic start at the same time as the operating system (used by the drivers).
| Service.DelayedStartup | Boolean | Specifies that the service will not be started immediately when the system starts but a little bit later. | Service.Description | Character string | Description of the service. | Service.LongDescription | Character string | Detailed description of the service. | Service.StartupError | Integer constant | The errors that occurred when starting a service are processed by Windows (for the services with automatic start):- serviceErrorCritical: The system writes the start service failure in the event observer log and restarts in "Last proper configuration known" mode.
- serviceErrorSerious: The system writes the start service failure in the event observer log and restarts in "Last proper configuration known" mode if it is not already is that mode.
- serviceErrorIgnore: The system performs no action if the service does not start.
- serviceErrorLog: The system writes the start service failure in the event observer log.
| Service.CommandLine | Character string | Full command line of the service (path of the executable and parameters). | Service.Type | Integer constant | Type of the service:- serviceTypeInteractiveShared: Service allowed to interact with the desktop and sharing its process with other services.
- serviceTypeInteractiveSimple: Service allowed to interact with the desktop and operating on its own in its process.
- serviceTypeShared: Standard service sharing its process with other services.
- serviceTypeDriverKernel: Driver of the kernel.
- serviceTypeDriverFileSystem: Driver of file system.
- serviceTypeSimple: Standard service operating on its own in its process.
| Service.User | Character string or String constant | User account that will run the service or one of the following constants:- AccountLocalService: Local account that has the recommended rights to run a service. On the network, this account will be considered as guest. This constant is available in modification only (ServiceModify).
- AccountNetworkService: Local account that has the recommended rights to run a service. On the network, this account will have the rights of the current computer.
- AccountLocalSystem: Local account representing the operating system. This account has all the rights. On the network, this account will have the rights of the current computer.
This constant corresponds to the "LocalSystem" account. Remark: Accounts identified via the AccountLocalService,AccountNetworkService and AccountLocalSystem constants do not have a password. | Service.Password | Character string | Password of the user account |
Remark: If a service is allowed to interact with the desktop (serviceTypeInteractiveShared or serviceTypeInteractiveSimple), its user account must be set to AccountLocalSystem. The other values will be ignored. Services authorized to interact with the desktop are not available since Windows Vista. | | | Element | Type | Effect |
---|
Service.NbActionOnFailure | Integer | Number of elements in the Service.ActionOnFailure and Service.TimeoutBeforeActionOnFailure arrays.- At the first failure of the service, the action specified in Service.ActionOnFailure[1] is run.
- At the Nth failure of the service, the action specified in Service.ActionOnFailure[n] is run. If the array contains less than n elements, the last action described is repeated for all the following failures.
| Service.ActionOnFailure | Array of Integer constants | Action performed if the service fails:- serviceFailureIgnore: the failure of the service is ignored, the service stops.
- serviceFailureStartApp: the service manager runs the command described in Service.StartAppOnFailure.
- serviceFailureReboot: the service manager restarts the computer.
- serviceFailureRestartService: the service manager restarts the service.
| Service.TimeoutBeforeActionOnFailure | Array of integers | Time-out (in milliseconds) before triggering the action specified in Service.ActionOnFailure. | Service.StartAppOnFailure | Character string | Command line called in the process of the serviceFailureStartApp action. If this command line contains the %1 string, this one will be replaced by the number of successive service failures during the call. | Service.MessageRebootOnFailure | Character string | Message sent to the users connected to the computer via the network in case of system reboot. | Service.ReinitFailureCounter | Integer | Time-out (in seconds) after which the failure counter is reset to 0 if no failure occurred. |
This page is also available for…
|
|
|
|