Skip to main content

Services

Install Windows services with your package.

Applies to: MSI and MSIX.


services – Windows services

Properties

PropertyTypeRequiredDefaultDescription
namestringyesService name (used by sc, the registry, etc.). Max 256 chars. Cannot contain / or \. Windows treats service names case-insensitively – pick a unique, brand-prefixed name (e.g., My ApplicationUpdater not Updater).
displayNamestringnoUser-friendly name shown in services.msc. Max 256 chars.
executablestringyesPath inside the package to the service binary. Validated against fileSystemEntries.
argumentsstringnoCommand-line arguments.
startAccountenumnoLocalSystemOne of LocalSystem, LocalService, NetworkService. For MSI only, custom domain accounts are also accepted (see notes).
startupTypeenumnoAutoOne of Auto, Manual, Disabled.
descriptionstringnoService description.
dependenciesstring[]noOther service names or load-ordering groups that must start first.
msiobjectnosee defaults belowMSI-specific config.

msi sub-object

PropertyTypeDefaultDescription
loadOrderGroupstringThe load-order group name.
errorControlenumNormalIgnore, Normal, Critical. Action if the service fails to start at boot.
serviceTypeenumOwnProcessOwnProcess or ShareProcess. Whether the service runs in its own process.
interactivebooleanfalseWhether the service can interact with the desktop. Requires LocalSystem.
startAccountPasswordstringPassword for a custom startAccount. NOT allowed for LocalSystem/LocalService/NetworkService.

Examples

Simple background service

"services": [
{
"name": "My ApplicationUpdater",
"displayName": "My Application Updater",
"executable": "$.installDir\\My Application.Service.exe",
"startupType": "Auto",
"description": "Periodically syncs notes to the cloud."
}
]

Default account is LocalSystem, default error control is Normal.

Run as LocalService and depend on the network

{
"name": "My ApplicationSync",
"displayName": "My Application Sync",
"executable": "$.installDir\\My Application.Sync.exe",
"startAccount": "LocalService",
"startupType": "Auto",
"dependencies": ["LanmanWorkstation", "Tcpip"],
"description": "Syncs notes over the LAN."
}

MSI-only: custom domain account

{
"name": "My ApplicationEnterprise",
"executable": "$.installDir\\My Application.Enterprise.exe",
"startAccount": ".\\My CompanyService",
"startupType": "Auto",
"msi": {
"serviceType": "OwnProcess",
"errorControl": "Normal",
"startAccountPassword": "[SERVICE_PASSWORD]"
}
}

[SERVICE_PASSWORD] is an MSI Formatted token resolved at install time – pass SERVICE_PASSWORD=Sup3r$ecret! on the msiexec command line. Never hard-code service passwords in JSON.

startAccount rules:

  • For OwnProcess MSI services: DomainName\UserName or .\UserName (built-in domain).
  • ShareProcess and interactive: true MSI services must use LocalSystem.
  • MSIX services support only LocalSystem, LocalService, NetworkService. Custom accounts will fail validation for MSIX builds.

MSI vs MSIX behavior

AspectMSIMSIX
Custom startAccount (domain user)Allowed (with startAccountPassword).Not allowed. Validation fails.
interactive servicesSupported.Not supported.
serviceType: ShareProcessSupported.Limited.
Auto-detected MSIX capabilitiesMPDEV automatically declares localSystemServices / packagedServices / allowElevation as needed.

Validation rules

ValidatorCatch
requiredname, executable are mandatory.
max sizeservices.name and services.displayName ≤ 256 chars.
illegal charactersservices.name cannot contain / or \.
valid path in packageservices.executable must point to a path inside fileSystemEntries.
valid valueEnum-based fields must use a valid value.
valid service start accountCustom startAccount only for MSI.
valid start account passwordstartAccountPassword cannot be set for built-in accounts.