|
|
|
|
|
The Service variable is used to: The Service variable includes the following elements: | | | Element | Type | Effect |
---|
Service.Startup | Integer constant | Service start mode:- serviceAutomaticStart Automatic startup after system initialization.
- serviceStartDisabled: Service is disabled. Any attempt to start it triggers an error.
- serviceManualStart Manual start (e.g. with function ServiceStart).
- serviceSystemStart Automatic startup at the same time as the operating system (used by 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 | Service description. | 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):- serviceCriticalError The system records the service startup failure in the Event Viewer log and restarts in "Last known good configuration" mode.
- serviceGraveError The system records the service startup failure in the Event Viewer log and restarts in "Last known good configuration" mode, if not already in this mode.
- serviceErrorIgnore The system does nothing special if the service fails to start.
- serviceErrorLog The system writes the service startup failure to the event viewer 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 authorized to interact with the office and share its Process with other services.
- serviceTypeInteractiveSimple Service authorized to interact with the desktop and operating alone in its Process.
- serviceTypeShared Standard service sharing its Process with other services.
- serviceTypeKernelPilot Core driver.
- serviceTypeFileSystemDriver File system driver.
- serviceTypeSimple Standard service operating alone in its Process.
| Service.User | Character string or String constant | User account that will run the service or one of the following constants:- LocalServiceAccount Local account that has recommended rights to run a service. On the network, this account will be considered as guest. This constant is available in modification only (ServiceModify).
- NetworkServiceAccount Local account with recommended rights to run a service. On the network, this account will have the rights of the current computer.
- LocalSystemAccount 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. Note Accounts identified by the constants LocalServiceAccount,NetworkServiceAccount and LocalSystemAccount have no password. | Service.Password | Character string | Password of the user account |
Note If a service is of a type authorized to interact with the desktop (serviceTypeInteractiveShared or serviceTypeInteractiveSimple), its user account must be LocalSystemAccount. 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: service failure is ignored, service stops.
- serviceFailureLaunchAppli the service manager launches the Command described in Service.LaunchAppliOnFailure.
- serviceFailReboot: the service manager restarts the computer.
- serviceFailureRestartService: the service manager restarts the service.
| Service.TimeoutBeforeActionOnFailure | Array of integers | Timeout (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 with 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 | Timeout (in seconds) after which the failure counter is reset to 0 if no failure occurred. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|