Skip to main content

Shortcuts and URL Shortcuts

Two array properties cover all shortcut needs:

  • shortcuts – Windows .lnk shortcuts (Start menu, Desktop, custom locations). For MSIX these become app entries in the Start menu / All Apps list.
  • urlShortcuts – Web .url shortcuts that open in the user's default browser.

Applies to: MSI and MSIX.

MSIX requires at least one shortcuts entry. Without it, the OS has no idea what to surface as the "app". Validation will fail with at least one msix shortcut required.


shortcuts – application shortcuts

Properties

PropertyTypeRequiredDefaultDescription
targetstringyesThe exe/file the shortcut launches. Usually a path inside the package ($.installDir\\MyApp.exe).
namestringnofilename of target minus extensionDisplay name.
locationstringnosee belowFolder where the shortcut is created.
argumentsstringnoCommand-line arguments passed to target.
workingDirectorystringnoWorking directory for the shortcut.
descriptionstringnoTooltip text on hover.
iconstringnoicon extracted from targetSource .ico/.png/.exe/.dll. Append ,index for an exe/dll icon.

Default location

  • If the package has one shortcut: %PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\
  • If the package has more than one shortcut: %PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\$.packageName\ (a sub-folder named after your package)

You can always override location:

{
"target": "$.installDir\\MyApp.exe",
"location": "%PUBLIC%\\Desktop"
}
warning

The user's desktop is private. Validation will warn you with "It is not recommended to create a shortcut on the user's desktop as it is their private space." Use the public desktop (%PUBLIC%\Desktop) if you really want one.

Examples

Minimal Start menu shortcut

"shortcuts": [
{ "target": "$.installDir\\MyApp.exe" }
]

Creates My Application.lnk in the Start menu.

Branded shortcut with description and custom icon

"shortcuts": [
{
"target": "$.installDir\\MyApp.exe",
"name": "My Application",
"description": "My Application does amazing things",
"icon": "installer-assets\\notes-icon.ico",
"workingDirectory": "%USERPROFILE%\\Documents"
}
]

Multiple shortcuts under a package folder

"shortcuts": [
{
"target": "$.installDir\\MyApp.exe",
"name": "My Application"
},
{
"target": "$.installDir\\MyApp.exe",
"name": "My Application (Safe Mode)",
"arguments": "--safe-mode"
}
]

Because there is more than one entry, both shortcuts appear in the Start menu under My Application/.

Public desktop shortcut

"shortcuts": [
{
"target": "$.installDir\\MyApp.exe",
"location": "%PUBLIC%\\Desktop",
"name": "My Application"
}
]

urlShortcuts – web URL shortcuts

.url files that open in the default browser when launched.

Properties

PropertyTypeRequiredDefaultDescription
namestringyesThe shortcut's file name (without .url). Must be unique across all urlShortcuts.
urlstringyesAn HTTP or HTTPS URL.
locationstringnosame logic as shortcuts.locationFolder where the .url file is created.

Example

"urlShortcuts": [
{
"name": "My Application - Documentation",
"url": "https://docs.mycompany.example.com"
},
{
"name": "My Application - Support",
"url": "https://support.mycompany.example.com"
}
]

Creates My Application - Documentation.url and My Application - Support.url in the Start menu folder.


MSI vs MSIX behavior

AspectMSIMSIX
Required?NoYes – at least one shortcuts entry.
locationHonored exactly.Mostly ignored. MSIX exposes the shortcut as an app entry in the Start menu. The system controls the placement.
Icon sourceResolved at build time, embedded in MSI.Embedded in the manifest as the package logo. Multiple sizes auto-generated.
arguments, workingDirectory, descriptionAll honored.All honored where the MSIX manifest supports them.
Multiple shortcutsSub-folder created automatically.Each entry is a separate app entry.

Validation rules

ValidatorApplies toCatch
requiredtarget, urlShortcuts.name, urlShortcuts.urlCannot be null/empty.
valid pathtargetMust be a syntactically valid path.
valid http urlurlShortcuts.urlMust be a real HTTP/HTTPS URL.
valid icon sourceiconMust point to .ico, .png, .exe, or .dll.
at least one msix shortcut requiredarrayAt least one entry needed when building MSIX.
unique url shortcut nameurlShortcuts.nameAll name values must be unique.

You will also see warnings about the user's desktop and shortcuts placed outside Start Menu\Programs. They are best-practice guardrails, not blockers.