SERVICE_IS_STATUS
InstallShield 2022 » InstallScript Language Reference
Project:This information applies to InstallScript projects.
When you call ServiceGetServiceState, this structured variable returns identification information about the service. This system variable is of type SERVICE_IS_STATUS; it has the following members:
Member |
Meaning |
|||||||||||||||||||||
dwServiceType |
The type of service. This member can be one of the following values.
If the service type is either SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS, the following type may also be specified.
|
|||||||||||||||||||||
dwCurrentState |
The current state of the service. This member can be one of the following values.
|
|||||||||||||||||||||
dwWin32ExitCode |
A Win32 error code that the service uses to report an error that occurs when it is starting or stopping. To return an error code specific to the service, the service must set this value to ERROR_SERVICE_SPECIFIC_ERROR to indicate that the dwServiceSpecificExitCode member contains the error code. The service should set this value to NO_ERROR when it is running and on normal termination. |
|||||||||||||||||||||
dwServiceSpecificExitCode |
A service-specific error code that the service returns when an error occurs while the service is starting or stopping. This value is ignored unless the dwWin32ExitCode member is set to ERROR_SERVICE_SPECIFIC_ERROR. |
|||||||||||||||||||||
dwCheckPoint |
A value that the service increments periodically to report its progress during a lengthy start, stop, pause, or continue operation. For example, the service should increment this value as it completes each step of its initialization when it is starting up. The user interface program that invoked the operation on the service uses this value to track the progress of the service during a lengthy operation. This value is not valid and should be zero when the service does not have a start, stop, pause, or continue operation pending. |
|||||||||||||||||||||
dwWaitHint |
An estimate of the amount of time, in milliseconds, that the service expects a pending start, stop, pause, or continue operation to take before the service makes its next call to the Windows API function SetServiceStatus with either an incremented dwCheckPoint value or a change in dwCurrentState. If the amount of time specified by dwWaitHint passes, and dwCheckPoint has not been incremented, or dwCurrentState has not changed, the service control manager or service control program can assume that an error has occurred. |
|||||||||||||||||||||
dwControlsAccepted |
The control codes that the service will accept and process in its handler function. A user interface process can control a service by specifying a control command in the Windows API function ControlService. By default, all services accept the SERVICE_CONTROL_INTERROGATE value. Table lists the possible control codes for this member. |
dwControlAccepted Control Codes
This table lists the possible control codes for dwControlAccept script variable.
Control Code |
Description |
SERVICE_ACCEPT_NETBINDCHANGE |
The service is a network component that can accept changes in its binding without being stopped and restarted. This control code allows the service to receive SERVICE_CONTROL_NETBINDADD, SERVICE_CONTROL_NETBINDREMOVE, SERVICE_CONTROL_NETBINDENABLE, and SERVICE_CONTROL_NETBINDDISABLE notifications. |
SERVICE_ACCEPT_PARAMCHANGE |
The service can reread its startup parameters without being stopped and restarted. This control code allows the service to receive SERVICE_CONTROL_PARAMCHANGE notifications. |
SERVICE_ACCEPT_PAUSE_CONTINUE |
The service can be paused and continued. This control code allows the service to receive SERVICE_CONTROL_PAUSE and SERVICE_CONTROL_CONTINUE notifications. |
SERVICE_ACCEPT_SHUTDOWN |
The service is notified when system shutdown occurs. This control code allows the service to receive SERVICE_CONTROL_SHUTDOWN notifications. Note that the Windows API function ControlService cannot send this notification; only the system can send it. |
SERVICE_ACCEPT_STOP |
The service can be stopped. This control code allows the service to receive SERVICE_CONTROL_STOP notifications. |
The dwControlAccept value can also contain the following extended control codes, which are supported only by service handler functions that are used with the Windows API function RegisterServiceCtrlHandlerEx.
Control Code |
Description |
SERVICE_ACCEPT_HARDWAREPROFILECHANGE |
The service is notified when the computer's hardware profile has changed. This enables the system to send SERVICE_CONTROL_HARDWAREPROFILECHANGE notifications to the service. |
SERVICE_ACCEPT_POWEREVENT |
The service is notified when the computer's power status has changed. This enables the system to send SERVICE_CONTROL_POWEREVENT notifications to the service. |
SERVICE_ACCEPT_SESSIONCHANGE |
Whistler: The service is notified when the computer's session status has changed. This enables the system to send SERVICE_CONTROL_SESSIONCHANGE notifications to the service. |
See Also