SOLVED

Duplication Shortcuts on Win11

MVP

[NOTE: This was submitted via Feedback hub also, making it visible to others]

 

Apps repackaged with the MSIX Packaging Tool (2023.118 and 2023.321) that have shortcuts with arguments now have an additional desktop7:shortcut element. This el is ignored on Win10 but supported on Win11. This is causing an additional copy of the shortcut in the start menu on Win11 (with an incorrect icon).

 

The icon with the correct icon starts the app, however the command line arg is not present (win10/11). The icon with the incorrect icon (Win11) does not result in a launch at all.

 

An example application producing this behavior is Telerik Fiddler (Classic). The native installation produces two shortcuts. I am attaching screen shots of how the start menu looks with the MSIX package on both Windows 10 and Windows 11, a screen shot of the relevant AppXManifest entry for one of the applications, and a completed package. I am also adding a screen-shot from the Task Manager that shows the command line when the Start menu entry for "Fiddler 4" with correct icon is run.

 

It seems that when desktop7 extension is used, it should replace (rather than augment) the entry normally created by the visual elements, but there are clearly issues with the shortcut being generated.  It looks like an AppInstaller issue to me, but possibly in the packaging.

23 Replies
version looks good, is it possible to share the package to validate and find the cause?

@kyelamarthi I have sent you the link to the package in a direct message.

@Edijs_Perkums_MasterPackager Your package is using "[{Common Programs}]" in the shortcut file section. "[{Common Programs}]" is used to create system wide shortcut. In MSIX you won't be able to create system wide shortcuts. You can convert this shortcut to user level shortcut by replacing the token to "[{Programs}]".

Another problem which I can see with your package is that it is creating multiple shortcuts for one application. As of now we support just one start menu shortcut per application.

If you need more than one shortcut you need to provide as many "Application" entries. You can hide the default tile for these by setting AppListEntry="none". Please have a look at the below manifest snippet for reference:

    <Application Id="VLC2" Executable="VFS\ProgramFilesX86\VideoLAN\VLC\vlc.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements BackgroundColor="transparent" DisplayName="VLC media player" Square150x150Logo="Assets\VLC-Square150x150Logo.png" Square44x44Logo="Assets\VLC-Square44x44Logo.png" Description="VLC media player" AppListEntry="none">
        <uap:DefaultTile Wide310x150Logo="Assets\VLC-Wide310x150Logo.png" Square310x310Logo="Assets\VLC-Square310x310Logo.png" Square71x71Logo="Assets\VLC-Square71x71Logo.png" />
      </uap:VisualElements>
      <Extensions>
        <desktop7:Extension Category="windows.shortcut">
          <desktop7:Shortcut File="[{Programs}]\VideoLAN\VLC media player skinned.lnk" Icon="[{Package}]\VFS\ProgramFilesX86\VideoLAN\VLC\vlc.exe" Arguments="-Iskins" />
        </desktop7:Extension>
      </Extensions>
    </Application>
    <Application Id="VLC3" Executable="VFS\ProgramFilesX86\VideoLAN\VLC\vlc.exe" EntryPoint="Windows.FullTrustApplication">
      <uap:VisualElements BackgroundColor="transparent" DisplayName="VLC media player" Square150x150Logo="Assets\VLC-Square150x150Logo.png" Square44x44Logo="Assets\VLC-Square44x44Logo.png" Description="VLC media player" AppListEntry="none">
        <uap:DefaultTile Wide310x150Logo="Assets\VLC-Wide310x150Logo.png" Square310x310Logo="Assets\VLC-Square310x310Logo.png" Square71x71Logo="Assets\VLC-Square71x71Logo.png" />
      </uap:VisualElements>
      <Extensions>
        <desktop7:Extension Category="windows.shortcut">
          <desktop7:Shortcut File="[{Programs}]\VideoLAN\VLC media player.lnk" Icon="[{Package}]\VFS\ProgramFilesX86\VideoLAN\VLC\vlc.exe" />
        </desktop7:Extension>
      </Extensions>
    </Application>



Thank you, finally an explanation how to get it working. However as mentioned before, this is not "my" package. This is what the Microsoft MSIX packaging tool generates when repackaging VLC, the manifest has not been edited by me. So the MSIX packaging tool generates an incorrect manifest.
It would be nice if this was actually documented.
https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-desktop7-shortcu...
Does not mention anywhere that you can only create shortcuts to user writable locations. Also the File attribute is documented absolutely incorrectly. "The path to the file that is the target of the shortcut." It is not the path of the target of the shortcut, it is the path of the shortcut itself.
Also the App Installer should throw an error that it can't create the shortcut instead of just installing without the shortcut.