Skip to main content

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​

PropertyTypeRequiredDefaultDescription
typeenumyes–OnLogin (every logon) or AfterInstall (one-shot, immediately after install).
executablestringyes–Path inside the package to the executable.
argumentsstringno–Command-line arguments.
workingDirectorystringno–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​

ValidatorCatch
requiredtype, executable are mandatory.
valid path in packagestartup.executable must point to a path inside fileSystemEntries.
valid valuetype must be OnLogin or AfterInstall.