Remove Advertise=yes from MSI shortcuts to fix Warning 1946#40272
Draft
Remove Advertise=yes from MSI shortcuts to fix Warning 1946#40272
Conversation
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>
Contributor
There was a problem hiding this comment.
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.IsSystemComponentshortcut property from the WSL Settings non-server shortcut.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes
Advertise=yesfrom 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
.lnkfiles that cannot storeVT_CLSIDproperty types viaIPropertyStore. TheSystem.AppUserModel.ToastActivatorCLSIDproperty (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
Advertise=yesfrom all 3 shortcuts (WSL, WSL Settings non-server, WSL Settings server)IsSystemComponentShortcutProperty from the WSL Settings non-server shortcut — it was silently failing due to the same limitation and is no longer neededWhy Advertising Was Unnecessary
The WSL MSI has a single feature at
Level=1(always installed) withARPNOMODIFY=yesandARPSYSTEMCOMPONENT=yes. MSI advertising (install-on-demand / self-repair) provides no value in this configuration.Verification
System.AppUserModel.ToastActivatorCLSIDis correctly set on the WSL shortcut (confirmed via IPropertyStore)System.AppUserModel.IDremains correctly set