Startup
Run an executable at user logon or right after install.
Applies to: MSI and MSIX.
startup – run something at logon or after install
Properties
| Property | Type | Required | Default | Description |
|---|---|---|---|---|
type | enum | yes | – | OnLogin (every logon) or AfterInstall (one-shot, immediately after install). |
executable | string | yes | – | Path inside the package to the executable. |
arguments | string | no | – | Command-line arguments. |
workingDirectory | string | no | – | Working directory. |
Example – auto-launch app at logon
"startup": [
{
"type": "OnLogin",
"executable": "$.installDir\\MyApp.exe",
"arguments": "--minimised"
}
]
Example – run a one-time post-install task
"startup": [
{
"type": "AfterInstall",
"executable": "$.installDir\\My Application.FirstRunSetup.exe",
"workingDirectory": "$.installDir",
"arguments": "--silent"
}
]
AfterInstall runs once, in the security context of the install.
MSI vs MSIX behavior
Both formats honor OnLogin and AfterInstall.
Validation rules
| Validator | Catch |
|---|---|
required | type, executable are mandatory. |
valid path in package | startup.executable must point to a path inside fileSystemEntries. |
valid value | type must be OnLogin or AfterInstall. |