Skip to content

Respect DESKTOP_SHORTCUT property during silent installs - #132

Merged
freakboy3742 merged 1 commit into
beeware:mainfrom
HT-573:fix-silent-desktop-shortcut
Oct 18, 2026
Merged

freakboy3742 merged 1 commit into
beeware:mainfrom
HT-573:fix-silent-desktop-shortcut

Conversation

@HT-573

@HT-573 HT-573 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Running a silent install, the DESKTOP_SHORTCUT property is ignored and a desktop shortcut is always created. For example when passing DESKTOP_SHORTCUT="" (msiexec /i app.msi /qn DESKTOP_SHORTCUT="") a shortcut is created anyway.

DesktopShortcutFeature previously defaulted to Level="1" and relied on dialog <Publish> events to disable the feature. Since silent installations (/qn) bypass the InstallUISequence, those dialog events do not run and the feature remains at Level="1".

This change

  • Sets the baseline for DesktopShortcutFeature to Level="0"
  • Adds <Level Condition="DESKTOP_SHORTCUT = &quot;1&quot; OR UILevel &gt;= 5" Value="1" /> so the feature is enabled in silent installs only when DESKTOP_SHORTCUT="1", while remaining enabled at the start of interactive installs so they work as before.

Testing

Tested using a packaged test MSI configured with create_desktop_shortcut = true:

  • Silent install with DESKTOP_SHORTCUT="" (msiexec /i app.msi /qn DESKTOP_SHORTCUT=""),
  • Silent install with default settings (msiexec /i app.msi /qn),
  • Interactive GUI install with "Create a desktop shortcut" unchecked,
  • Interactive GUI install with "Create a desktop shortcut" checked.

Note: This is also the case in beeware/briefcase-windows-app-template. If you feel that these changes are reasonable I'm happy to open a matching PR there.

Refs ankitects/anki#5671

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

Assisted-by: Gemini 4 Argon

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - thanks for the contribution! I'll merge this back to the app template shortly.

@freakboy3742
freakboy3742 merged commit 8a45129 into beeware:main Oct 18, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants