SERVICE_IS_PARAMS
InstallShield 2022 » InstallScript Language Reference
Project:This information applies to InstallScript projects.
The SERVICE_IS_PARAMS variable is initialized automatically during installation initialization by a call to ServiceInitParams.
Note:Certain InstallScript service functions internally call the Windows API functions OpenSCManager, CreateService, or ChangeServiceConfig. The following members of the structured variable SERVICE_IS_PARAMS specify the corresponding arguments for these Windows API functions:
|
•
|
SERVICE_IS_PARAMS.lpMachineName |
|
•
|
SERVICE_IS_PARAMS.lpDatabaseName |
|
•
|
SERVICE_IS_PARAMS.dwDesiredAccess |
|
•
|
SERVICE_IS_PARAMS.dwServiceType |
|
•
|
SERVICE_IS_PARAMS.dwStartType |
|
•
|
SERVICE_IS_PARAMS.dwErrorControl |
|
•
|
SERVICE_IS_PARAMS.lpLoadOrderGroup |
|
•
|
SERVICE_IS_PARAMS.lpdwTagId |
|
•
|
SERVICE_IS_PARAMS.lpDependencies |
|
•
|
SERVICE_IS_PARAMS.lpServiceStartName |
|
•
|
SERVICE_IS_PARAMS.lpPassword |
The following members of SERVICE_IS_PARAMS control how the installation behaves when waiting for a service to reach a desired state. See the descriptions for each member for additional information.
|
•
|
SERVICE_IS_PARAMS.nWaitHintMin |
|
•
|
SERVICE_IS_PARAMS.nWaitHintMax |
|
•
|
SERVICE_IS_PARAMS.nStartServiceWaitCount |
|
•
|
SERVICE_IS_PARAMS.nStopServiceWaitCount |
The SERVICE_IS_PARAMS script variable has the following members:
SERVICE_IS_PARMS Parameters
|
|
dwServiceType
|
This member can be set to these predefined constants:
|
•
|
SERVICE_WIN32_OWN_PROCESS |
|
•
|
SERVICE_WIN32_SHARE_PROCESS |
|
•
|
SERVICE_FILE_SYSTEM_DRIVER |
|
•
|
SERVICE_RECOGNIZER_DRIVER |
|
•
|
SERVICE_INTERACTIVE_PROCESS |
|
dwStartType
|
This member can be set to these predefined constants:
|
dwErrorControl
|
This member can be set to these predefined constants:
|
nWaitHintMin
|
Specifies the minimum dwWaitHint wait time (in milliseconds). If a service specifies a dwWaitHint smaller than nWaitHintMin, nWaitHintMin is used instead as the wait time. This applies to both starting and stopping services.
The default value of this member variable is 1000 (1 second), and is set by calling ServiceInitParams. See the MDSN documentation for more information on how a service sets dwWaitHint.
|
nWaitHintMax
|
Specifies the maximum dwWaitHint wait time (in milliseconds). If a service specifies a dwWaitHint longer than nWaitHintMax, nWaitHintMax is used instead as the wait time. This applies to both starting and stopping services.
The default value of this member variable is 10000 (10 seconds), and is set by calling ServiceInitParams. See the MDSN documentation for more information on how a service sets dwWaitHint.
|
nStartServiceWaitCount
|
Specifies the service start timeout in seconds. This value can be set to a specific value to force the installation to stop waiting after the specified interval regardless of whether the service has reached the desired state.
Important:Unlike nWaitHintMax, if a service specifies a long dwWaitHint, the installation does not interrupt this wait regardless of the value of this parameter. Therefore, it is recommended that this value not be changed from the default value of INFINITE set by ServiceInitParams. Instead, update nWaitHintMax to prevent an undesired wait interval.
|
nStopServiceWaitCount
|
Specifies the service stop timeout in seconds. This value can be set to a specific value to force the setup to stop waiting after the specified interval regardless of whether the service has reached the desired state.
Important:Unlike nWaitHintMax, if a service specifies a long dwWaitHint, the installation does not interrupt this wait regardless of the value of this parameter. Therefore, it is recommended that this value not be changed from the default value of INFINITE set by ServiceInitParams. Instead, update nWaitHintMax to prevent an undesired wait interval.
|
Additional Information
For more information about the Windows API functions OpenSCManager, CreateService, or ChangeServiceConfig, consult the Windows API documentation.
See Also
ServiceGetServiceState
ServiceExistsService
ServiceRemoveService
ServiceStartService
ServiceStopService