PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Service variable
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
The Service variable is used to:
Service variable
The Service variable includes the following elements:
ElementTypeEffect
Service.StartupInteger constantMode for starting the service:
  • 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).
Versions 15 and later
Service.DelayedStartup
New in version 15
Service.DelayedStartup
Service.DelayedStartup
BooleanSpecifies that the service will not be started immediately when the system starts but a little bit later.
Windows Notes:
  • This element is only taken into account for Windows services.
  • This element is only taken into account starting with Windows Vista.
Service.DescriptionCharacter stringDescription of the service.
Windows Note: This information appears in the "Full name" item of the service manager.
Versions 15 and later
Service.LongDescription
New in version 15
Service.LongDescription
Service.LongDescription
Character stringDetailed description of the service.
Windows Note: this information appears in the "Description" item of the service manager.
Service.StartupErrorInteger constantThe 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.CommandLineCharacter stringFull command line of the service (path of the executable and parameters).
Service.TypeInteger constantType 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.UserCharacter string or String constantUser 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.
Note: Accounts identified via the AccountLocalService,AccountNetworkService and AccountLocalSystem constants do not have a password.
Service.PasswordCharacter stringPassword of the user account
Note: 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.
Versions 15 and later
Windows From Windows 2000, additional elements are available to manage the service failures. A service failure is an executable stoppage following a fatal error. In Windows NT and Linux, these elements are ignored.
ElementTypeEffect
Service.NbActionOnFailureIntegerNumber 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.ActionOnFailureArray of Integer constantsAction 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.TimeoutBeforeActionOnFailureArray of integersTime-out (in milliseconds) before triggering the action specified in Service.ActionOnFailure.
Service.StartAppOnFailureCharacter stringCommand 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.MessageRebootOnFailureCharacter stringMessage sent to the users connected to the computer via the network in case of system reboot.
Service.ReinitFailureCounterIntegerTime-out (in seconds) after which the failure counter is reset to 0 if no failure occurred.
New in version 15
Windows From Windows 2000, additional elements are available to manage the service failures. A service failure is an executable stoppage following a fatal error. In Windows NT and Linux, these elements are ignored.
ElementTypeEffect
Service.NbActionOnFailureIntegerNumber 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.ActionOnFailureArray of Integer constantsAction 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.TimeoutBeforeActionOnFailureArray of integersTime-out (in milliseconds) before triggering the action specified in Service.ActionOnFailure.
Service.StartAppOnFailureCharacter stringCommand 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.MessageRebootOnFailureCharacter stringMessage sent to the users connected to the computer via the network in case of system reboot.
Service.ReinitFailureCounterIntegerTime-out (in seconds) after which the failure counter is reset to 0 if no failure occurred.
Windows From Windows 2000, additional elements are available to manage the service failures. A service failure is an executable stoppage following a fatal error. In Windows NT and Linux, these elements are ignored.
ElementTypeEffect
Service.NbActionOnFailureIntegerNumber 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.ActionOnFailureArray of Integer constantsAction 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.TimeoutBeforeActionOnFailureArray of integersTime-out (in milliseconds) before triggering the action specified in Service.ActionOnFailure.
Service.StartAppOnFailureCharacter stringCommand 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.MessageRebootOnFailureCharacter stringMessage sent to the users connected to the computer via the network in case of system reboot.
Service.ReinitFailureCounterIntegerTime-out (in seconds) after which the failure counter is reset to 0 if no failure occurred.
Minimum required version
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment