App-V to MSIX conversion: Shortcut argument skipped during conversion
Automatically converting your App-V application to MSIX spares you from rebuilding them from the ground up.
But, remember that the MSIX platform has its own unique set of constraints. These limitations are notably more expansive compared to the relatively more forgiving App-V 5 environment.
In this article, we're tackling a specific snag you may hit—handling shortcut arguments during this conversion.
App-V and MSIX – A Quick Recap
In our previous article we went through How to convert an App-V 5 file to MSIX.
Converting from an App-V package to MSIX is more direct and uncomplicated than with other installer technologies, such as MSI, EXE, or Script installers.
Essentially, you are expedited through the process, bypassing the usual steps of capturing your application installer's files and registries that are typical in repackaging.
The simplicity of this conversion lies in the fact that only the manifest file of the package requires modification, while all other package resources remain unchanged.
The App-V to MSIX conversion can be automated for bulk conversion. Here’s a step by step tutorial on How to Automate App-V 5 to MSIX Conversion,.
The Shortcut Argument Dilemma – VLC Media Player
One of those challenges affects those App-V packages where shortcuts have arguments defined within the AppXManifest.xml.
And a very good example here is VLC Media Player where the vendor installer copies two additional shortcuts in StartMenu. While the destination for both shortcuts is the same, the arguments differ:
- VLC media player skinned
- VLC media player - reset preferences and cache files
For those familiar with AppV-5, you may recall that shortcut arguments can be defined in the App-V 5 AppXManifest.xml. And this is how it looks for these two shortcuts:
<appv:Extension Category="AppV.Shortcut"> <appv:Shortcut> <appv:File>[{Common Programs}]\VideoLAN\VLC media player skinned.lnk</appv:File> <appv:Target>[{ProgramFilesX86}]\VideoLAN\VLC\vlc.exe</appv:Target> <appv:Icon>[{ProgramFilesX86}]\VideoLAN\VLC\vlc.exe.0.ico</appv:Icon> <appv:Arguments>-Iskins</appv:Arguments> <appv:WorkingDirectory>[{ProgramFilesX86}]\VideoLAN\VLC</appv:WorkingDirectory> <appv:ShowCommand>1</appv:ShowCommand> <appv:ApplicationId>[{ProgramFilesX86}]\VideoLAN\VLC\vlc.exe</appv:ApplicationId> </appv:Shortcut> </appv:Extension> <appv:Extension Category="AppV.Shortcut"> <appv:Shortcut> <appv:File>[{Common Programs}]\VideoLAN\VLC media player.lnk</appv:File> <appv:Target>[{ProgramFilesX86}]\VideoLAN\VLC\vlc.exe</appv:Target> <appv:Icon>[{ProgramFilesX86}]\VideoLAN\VLC\vlc.exe.0.ico</appv:Icon> <appv:Arguments /> <appv:WorkingDirectory>[{ProgramFilesX86}]\VideoLAN\VLC</appv:WorkingDirectory> <appv:ShowCommand>1</appv:ShowCommand> <appv:ApplicationId>[{ProgramFilesX86}]\VideoLAN\VLC\vlc.exe</appv:ApplicationId> </appv:Shortcut> </appv:Extension> |
---|
But when we install the MSIX package (either manually converted or automated via PowerShell), you'll find that only one of these shortcuts makes it to the Start Menu.
Why so?
The essence of the issue is that the AppXManifest.xml, post-conversion, has room for only one Application entry, causing the arguments to be lost in translation.
All three shortcut points to the same executable – vlc.exe – and the arguments were skipped during the conversion.
<Application Id="VLC" 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"> <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="[{Common Programs}]\VideoLAN\VLC media player - reset preferences and cache files.lnk" Icon="[{Package}]\VFS\ProgramFilesX86\VideoLAN\VLC\vlc.exe" Arguments="--reset-config --reset-plugins-cache vlc://quit" /> </desktop7:Extension> <desktop7:Extension Category="windows.shortcut"> <desktop7:Shortcut File="[{Common Programs}]\VideoLAN\VLC media player skinned.lnk" Icon="[{Package}]\VFS\ProgramFilesX86\VideoLAN\VLC\vlc.exe" Arguments="-Iskins" /> </desktop7:Extension> <desktop7:Extension Category="windows.shortcut"> <desktop7:Shortcut File="[{Common Programs}]\VideoLAN\VLC media player.lnk" Icon="[{Package}]\VFS\ProgramFilesX86\VideoLAN\VLC\vlc.exe" /> </desktop7:Extension>
The Workaround
So, how do you overcome this challenge? The Package Support Framework (PSF) is your go-to solution.
Injecting PSF into your converted MSIX package allows you to manually specify shortcut arguments in a config.json file.
If you’re using the MSIX Packaging Tool, you'll have to do this manually.
For further insights on utilizing the Package Support Framework, have a look at our previous article – The most common MSIX limitations and how to fix them with the Package Support Framework (PSF).
Advanced Installer: The One-Stop Solution
For those fortunate enough to be using Advanced Installer, rest easy!
During the import of your App-V 5 package for conversion to MSIX, Advanced Installer automatically handles all these intricacies.
- Go to the “Application Details” page, you will see that there are three entries there – one for each of the shortcuts.
- If we install the converted MSIX, all three shortcuts appear in the Start Menu, as they should.
- And if we look into the AppXManifest.xml, we’ll see that we have three application entries in there.
<Applications> <Application EntryPoint="Windows.FullTrustApplication" Executable="AI_STUBS\AiStubX64.exe" Id="VLCmediaplayer"> <uap:VisualElements BackgroundColor="transparent" Description="VLC media player" DisplayName="VLC media player" Square150x150Logo="Assets\VLCmediaplayerSquare150x150Logo.png" Square44x44Logo="Assets\VLCmediaplayerSquare44x44Logo.png"> <uap:InitialRotationPreference> <uap:Rotation Preference="portrait" /> <uap:Rotation Preference="landscape" /> </uap:InitialRotationPreference> <uap:DefaultTile Square310x310Logo="Assets\VLCmediaplayerSquare310x310Logo.png" Square71x71Logo="Assets\VLCmediaplayerSquare71x71Logo.png" Wide310x150Logo="Assets\VLCmediaplayerWide310x150Logo.png" /> <uap:SplashScreen Image="Assets\VLCmediaplayerSplashScreen.png" /> <uap:LockScreen BadgeLogo="Assets\VLCmediaplayerBadgeLogo.png" Notification="badge" /> </uap:VisualElements> <Extensions> ... </Extensions> </Application> <Application EntryPoint="Windows.FullTrustApplication" Executable="AI_STUBS\AiStubX64.exe" Id="VLCmediaplayerskinned"> <uap:VisualElements BackgroundColor="transparent" Description="VLC media player skinned" DisplayName="VLC media player skinned" Square150x150Logo="Assets\VLCmediaplayerskinnedSquare150x150Logo.png" Square44x44Logo="Assets\VLCmediaplayerskinnedSquare44x44Logo.png"> <uap:InitialRotationPreference> <uap:Rotation Preference="portrait" /> <uap:Rotation Preference="landscape" /> </uap:InitialRotationPreference> <uap:DefaultTile Square310x310Logo="Assets\VLCmediaplayerskinnedSquare310x310Logo.png" Square71x71Logo="Assets\VLCmediaplayerskinnedSquare71x71Logo.png" Wide310x150Logo="Assets\VLCmediaplayerskinnedWide310x150Logo.png" /> <uap:SplashScreen Image="Assets\VLCmediaplayerskinnedSplashScreen.png" /> <uap:LockScreen BadgeLogo="Assets\VLCmediaplayerskinnedBadgeLogo.png" Notification="badge" /> </uap:VisualElements> <Extensions> ... </Extensions> </Application> <Application EntryPoint="Windows.FullTrustApplication" Executable="AI_STUBS\AiStubX64.exe" Id="VLCmediaplayerresetpreferencesandcachefiles"> <uap:VisualElements BackgroundColor="transparent" Description="VLC media player - reset preferences and cache files" DisplayName="VLC media player - reset preferences and cache files" Square150x150Logo="Assets\VLCmediaplayerresetpreferencesandcachefilesSquare150x150Logo.png" Square44x44Logo="Assets\VLCmediaplayerresetpreferencesandcachefilesSquare44x44Logo.png"> <uap:InitialRotationPreference> <uap:Rotation Preference="portrait" /> <uap:Rotation Preference="landscape" /> </uap:InitialRotationPreference> <uap:DefaultTile Square310x310Logo="Assets\VLCmediaplayerresetpreferencesandcachefilesSquare310x310Logo.png" Square71x71Logo="Assets\VLCmediaplayerresetpreferencesandcachefilesSquare71x71Logo.png" Wide310x150Logo="Assets\VLCmediaplayerresetpreferencesandcachefilesWide310x150Logo.png" /> <uap:SplashScreen Image="Assets\VLCmediaplayerresetpreferencesandcachefilesSplashScreen.png" /> <uap:LockScreen BadgeLogo="Assets\VLCmediaplayerresetpreferencesandcachefilesBadgeLogo.png" Notification="badge" /> </uap:VisualElements> <Extensions> ... </Extensions> </Application> </Applications>
Why struggle with shortcuts? Let Advanced Installer handle the details. Get your free 30-day trial today!
Wrapping Up
While converting from App-V 5 to MSIX comes with its own set of challenges, tools like Advanced Installer make the transition smoother.
Even when you hit roadblocks like the one with shortcut arguments, know that solutions are readily available.
Until next time, keep optimizing!