Note
You are not reading the most recent version of this documentation. See the latest version available.
[MSI] Add Service InstallationΒΆ
Add a new Service that will be installed to the target system by the MSI package.
Important
Precondition: Open an MSI package in MSI Editor (see Open MSI/MST).
- Go to the Package Designer > Services tab.
- Select Add > Install service from the toolbox.
- On the General tab specify a name of the service, its display name, then click Executable: Browse and select a main executable file for the service. If needed, specify command line arguments or properties required to run the service in the Arguments field.
- Switch to the Parameters tab to set the required service settings and click Save. Find the description of parameters in the table below.
Service parameters:
Parameter
Description
Service type
Service that runs its own process
- (flag: WIN32_OWN_PROCESS)A Microsoft Win32 service that runs its own process.Service that shares a process
- (flag: WIN32_SHARE_PROCESS) A Win32 service that shares a process.
Interacts with the desktop
- (flag: NTERACTIVE_PROCESS) A Win32 service that interacts with the desktop. This parameters can be used with one of the two previous types. The User name must be set toLocalSystem
or left empty when using this option.Important
Note that a Driver and File system driver services are not supported by MSI.
Start type
Automatic
- (flag: AUTO_START) A service starts during startup of the system.Demand
- (flag: DEMAND_START) A service starts when the service control manager calls the StartService function.Disabled
- (flag: DISABLED) Specifies a service that can no longer be started.
Error control
Logs the error and continues with the startup operation
- (flag: IGNORE) simply ignores errors, occurred during startup and continues execution.Logs the error, displays a message box and continues the startup operation
- (flag: NORMAL) displays errors, occurred during startup and continues execution.Logs the error if it is possible and the system is restarted
- (flag: CRITICAL) does not ignore errors, occurred during startup and try to restart the system with the last configuration known to be good. If the last-known-good configuration is being started, the startup operation fails.
Abort the overall install if the service cannot be installed
- (flag: ErrorControlVital) specifies that the installation should fail if the service cannot be installed into the system.Load order group
A string that names the load ordering group of which this service is a member. Specify an empty string if the service does not belong to a group.
Dependencies
A list of names of services or load ordering groups that the system must start before this service. Separate names in the list by Nulls. If the service has no dependencies, then specify Null or an empty string. Use the syntax [~] to insert a Null. Dependency on a group means that this service can run if at least one member of the group is running after an attempt to start all members of the group. You must prefix group names with + so that they can be distinguished from a service name. To require that the system start service1 and at least one member of the ordering group MyGroup before starting the service, enter
service1[~]+MyGroup[~][~]
.User name
(i.e. Start name) The service is logged on using the account, specified in this field. Note that the user must have permissions to log on as a service.If the Service type is set to
Service that runs its own process
use an account name in the form:DomainName\UserName
. If the account belongs to the built-in domain it is permitted to specify.\UserName
. TheLocalSystem
account must be used if the type of service is set toService that shares a process
orInteracts with the desktop
option is selected. The CreateService function uses theLocalSystem
account if the User name field is empty. Most services therefore leave this column blank.Password
This string is the password to the account name specified in the User name field. The User name of
LocalSystem
is empty and therefore the password in this instance is also empty, so most services leave this column blank. Windows Installer does not write the value entered into the Password field into the log file. - Once the Service Installation entry is added, consider adding the Service Control entry to start the service after the installation.
Note
PACE Suite covers the whole range of application packaging tasks - learn more.
Try PACE Suite for free - 21 days no obligations unlimited trial with all functions unlocked.