Skip to content

Remove Advertise=yes from MSI shortcuts to fix Warning 1946#40272

Draft
benhillis wants to merge 1 commit intomasterfrom
fix/msi-remove-advertised-shortcuts
Draft

Remove Advertise=yes from MSI shortcuts to fix Warning 1946#40272
benhillis wants to merge 1 commit intomasterfrom
fix/msi-remove-advertised-shortcuts

Conversation

@benhillis
Copy link
Copy Markdown
Member

Summary

Removes Advertise=yes from all MSI shortcuts to fix Warning 1946 (Property 'System.AppUserModel.ToastActivatorCLSID' for shortcut 'WSL.lnk' could not be set) during installation.

Root Cause

Advertised shortcuts use Darwin descriptor .lnk files that cannot store VT_CLSID property types via IPropertyStore. The System.AppUserModel.ToastActivatorCLSID property (a GUID/VT_CLSID) was silently failing on the advertised shortcut, producing Warning 1946.

Note: System.AppUserModel.ID (VT_LPWSTR/string type) was not affected since Darwin descriptors can handle string properties.

Changes

  • Removed Advertise=yes from all 3 shortcuts (WSL, WSL Settings non-server, WSL Settings server)
  • Removed IsSystemComponent ShortcutProperty from the WSL Settings non-server shortcut — it was silently failing due to the same limitation and is no longer needed

Why Advertising Was Unnecessary

The WSL MSI has a single feature at Level=1 (always installed) with ARPNOMODIFY=yes and ARPSYSTEMCOMPONENT=yes. MSI advertising (install-on-demand / self-repair) provides no value in this configuration.

Verification

  • Warning 1946 no longer appears during install
  • System.AppUserModel.ToastActivatorCLSID is correctly set on the WSL shortcut (confirmed via IPropertyStore)
  • System.AppUserModel.ID remains correctly set
  • Toast notifications working
  • WSL shortcut visible in Start Menu with correct icon
  • Build succeeds (C++ and WiX MSI)

Advertised shortcuts use Darwin descriptor .lnk files that cannot store
VT_CLSID property types via IPropertyStore. This caused Warning 1946
during install when setting System.AppUserModel.ToastActivatorCLSID.

Removing Advertise=yes from all three shortcuts (WSL, WSL Settings
non-server, WSL Settings server) allows ShortcutProperty values to be
set correctly on standard .lnk files. MSI advertising provided no value
in this package since it has a single feature at Level=1 with
ARPNOMODIFY=yes.

Also removed the IsSystemComponent ShortcutProperty from the WSL
Settings non-server shortcut, which was previously silently failing
due to the same advertised shortcut limitation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 22, 2026 15:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the WSL MSI WiX authoring to avoid MSI advertised shortcuts, resolving installer Warning 1946 where System.AppUserModel.ToastActivatorCLSID could not be applied to the Start Menu shortcut due to Darwin descriptor .lnk limitations.

Changes:

  • Removed Advertise="yes" from the WSL and WSL Settings (server/non-server) Start Menu shortcuts.
  • Removed the System.AppUserModel.IsSystemComponent shortcut property from the WSL Settings non-server shortcut.

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