A Service object represents a service for installation on the target system. Note that this is different from the installation of the service's executable program: that must be installed separately as a file. The Service object merely registers the executable program as a service on the target system.
Installation of a service is controlled partially by its component: if the component is installed, the service is installed. However, for compatibility with Windows Installer, if the component is removed the service is not automatically removed. Instead, you must create a separate Service Action action that has its Remove action set to Delete Service, and link this Service Action action to the service's component.
If the service is not linked to a component, it is installed when the product as a whole is installed. In that case, the corresponding Delete Service service control action should not be linked to a component either.
Tip: If you want to start the newly installed service after installation and stop it prior to removal, you must add an additional service control object with its Install action set to Start Service and its Remove action to Stop Service, linked to the same component as the service itself.
Note: Service installation only applies to Windows NT-based platforms (NT4, 2000, XP, 2003 and later). Moreover, it requires that the installation is performed by a user with Administrator privileges. You can have the installer check for the required privileges by setting the Installation level attribute on the Installer options project page to Administrator.
The following attributes and options are available.
|Service name||Enter the name of the service that must be created.|
Select the type of service from the drop-down list. The following choices are available:
|Display name||Enter the user-visible name of the service; this field is localizable.|
|Description||Enter the user-visible description of the service; this field is localizable.|
|Localized||Check this box to localize the Description field and use different descriptions for different languages.|
|Executable file||Enter the path of the file that implements the service, or click ... (browse) to open the Select Installation File or Folder dialog box that allows you to browse for the desired file.|
Enter the command line arguments for the service if the service requires them for an automatic start. Be sure to quote any arguments that contain spaces or may expand to contain spaces, for example: /p "<INSTALLDIR>\file.ext".
These arguments are used when the system starts the service automatically or on demand (see Start type); if you start the service with a Service Action Start Service action, the Service Action action can specify its own startup arguments.
Select how the service is started. The following choices are available:
Enter the name of the load order group to which the service belongs, or leave empty if the service is not part of a group. If you specify a group name, the service will be started when its group is being loaded as determined by the registry value:
Enter the semicolon-delimited list of services and service groups on which the current service depends for its startup. The service will be started if all explicitly named services and at least one service from each group are running. You must prefix group names with a plus ('+') character to distinguish them from service names, for example:
Select how the system should respond if the service fails to start. The following choices are available:
Select the name of the account under which the service must be started. The following choices are available:
|Start name||If Start account is set to Other/Driver Name, enter the service's startup account name or its driver object name. An account name must have the format DomainName\UserName. To specify a user name in the local domain, use .\UserName.|
Enter the password for the Start name user account if it requires any, or leave blank otherwise.
Security warning: The password is stored unencrypted in the installer's database, which might pose a security risk.