@samitouri / QOSAMI-WSL / commits / af192038

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

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: Ben Hillis <benhill@ntdev.microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Ben Hillis committed May 12, 2026 at 14:52 UTC af192038e0434e2d55242c2fa3ab758f8f819390
1 file changed +3 -5
msipackage/package.wix.in
+3 -5
@@ -20,7 +20,7 @@
20 <Component Id="wsl" Guid="F0C8D6BA-1502-41E7-BF72-D93DFA134730" UninstallWhenSuperseded="yes" DisableRegistryReflection="yes" Bitness="always64">
21 <RemoveFile Id="CleanUpWSLShortCut" Directory="ProgramMenuFolder" Name="WSL" On="uninstall"/>
22 <File Id="wsl.exe" Name="wsl.exe" Source="${PACKAGE_INPUT_DIR}/wsl.exe" KeyPath="yes">
23 - <Shortcut Id="WSLShortcut" Name="WSL" Description="Windows Subsystem for Linux" Arguments="--cd ~" Advertise="yes" Directory="ProgramMenuFolder" Icon="wsl.ico">
23 + <Shortcut Id="WSLShortcut" Name="WSL" Description="Windows Subsystem for Linux" Arguments="--cd ~" Directory="ProgramMenuFolder" Icon="wsl.ico">
24 <ShortcutProperty Key="System.AppUserModel.ID" Value="Microsoft.WSL"/>
25 <ShortcutProperty Key="System.AppUserModel.ToastActivatorCLSID" Value="{2B9C59C3-98F1-45C8-B87B-12AE3C7927E8}"/>
26 </Shortcut>
@@ -415,9 +415,7 @@
415 <Component Id="wslsettingsnonserver" Guid="AB166073-8855-492B-95C8-C6E5939B66A5" Bitness="always64" DisableRegistryReflection="yes" UninstallWhenSuperseded="yes" Condition="MsiNTProductType = 1">
416 <RemoveFile Id="CleanUpWSLSettingsShortCutNonServer" Directory="ProgramMenuFolder" Name="WSLSettings" On="uninstall"/>
417 <File Id="wslsettings.exe_nonserver" Source="${PACKAGE_INPUT_DIR}/wslsettings/wslsettings.exe" KeyPath="yes" ShortName="kyk8fs6a.exe">
418 - <Shortcut Id="WSLSettingsShortcutNonServer" Name="WSL Settings" Description="Windows Subsystem for Linux Settings" Advertise="yes" Directory="ProgramMenuFolder" Icon="wsl.ico">
419 - <ShortcutProperty Key="System.AppUserModel.IsSystemComponent" Value="true"/>
420 - </Shortcut>
418 + <Shortcut Id="WSLSettingsShortcutNonServer" Name="WSL Settings" Description="Windows Subsystem for Linux Settings" Directory="ProgramMenuFolder" Icon="wsl.ico"/>
419 </File>
420 <!-- Protocol registration -->
421 <RegistryKey Root="HKLM" Key="Software">
@@ -446,7 +444,7 @@
444 <Component Id="wslsettingsserver" Guid="EE2D69A0-4F55-4EC5-9576-4FAD70BC798E" Bitness="always64" DisableRegistryReflection="yes" UninstallWhenSuperseded="yes" Condition="MsiNTProductType &gt; 1">
445 <RemoveFile Id="CleanUpWSLSettingsShortCutServer" Directory="ProgramMenuFolder" Name="WSLSettings" On="uninstall"/>
446 <File Id="wslsettings.exe_server" Source="${PACKAGE_INPUT_DIR}/wslsettings/wslsettings.exe" KeyPath="yes" ShortName="kyk8fs6b.exe">
449 - <Shortcut Id="WSLSettingsShortcutServer" Name="WSL Settings" Description="Windows Subsystem for Linux Settings" Advertise="yes" Directory="ProgramMenuFolder" Icon="wsl.ico"/>
447 + <Shortcut Id="WSLSettingsShortcutServer" Name="WSL Settings" Description="Windows Subsystem for Linux Settings" Directory="ProgramMenuFolder" Icon="wsl.ico"/>
448 </File>
449 <!-- Protocol registration -->
450 <RegistryKey Root="HKLM" Key="Software">