How to approach a Start Menu entry in your MSIX package? And what challenges are there?
In our previous MSIX related blog articles, we’ve approached some of the MSIX particularities and different scenarios such as Digital Signing, MSIX Deployment via SCCM, MS-AppInstaller Web Protocol, and Context Menu.
MSIX shortcuts make no exception when it comes to Microsoft’s approach, compared to the MSI shortcuts concept. When an MSIX application is installed, it does not create a .lnk file as we are used to. Instead, it creates only a Start Menu application entry. But don’t panic thinking your MSIX shortcut is missing, or something went wrong with your application.
From MSIX perspective, Start Menu entries are managed via AppxManifest.xml and below you can find an example of how the Application section should look like within the AppxManifest.xml.
<Application Id="VLC" Executable="VFS\ProgramFiles\VideoLAN\VLC\clv.exe" EntryPoint="Windows.FullTrustApplication"> <uap:VisualElements BackgroundColor="transparent" DisplayName="GP" ........................... </uap:VisualElements> </Application>
Start Menu - MSI VS MSIX
For a better understanding of the concept, we created two packages (one MSI and one MSIX) and installed them both on the same device.
The VLC entries we find inside the VideoLAN folder are installed by our MSI package. The two VLC media player entries we see outside the folder are the MSIX ones.
Now lets pin the two “VLC media player” entries to Start and try to emphasize the differences between them.The large icon belongs to the MSIX app.
As we right-click the first icon (MSI one), we get a familiar context menu.
Open file location gets us to the standard shortcut location: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\VideoLAN
Note: If you go up one directory to see all listed shortcuts & folders, you may notice Windows Explorer cannot see the MSIX “VLC media player” entry.
By Right-clicking Properties on VLC media player shortcut installed via MSI package, we can navigate to the Shortcut tab where we see all the shortcut properties. On the Target field, we can add arguments to our executable, or we can even change it to a network path .exe file. However, be aware that some of these fields are greyed out if your shortcut is advertised.
Going back to our MSIX VLC media player, we notice that by right-clicking on the icon, we get a different context. There is no “Open file location”. Microsoft treats this application as UWP app, adding the modern experience for Windows 10 users.
As we click App settings, we observe things are different compared to the previous (MSI) VLC media player property page. There are no parameters nor “shortcut” properties that can be modified.
MSIX shortcut argument solution in Advanced Installer
Let’s say you have an MSI/APP-V application, and you convert it to MSIX. But you notice your original MSI shortcut launches an executable with command-line argument.
We know from the information presented above that this is a well-known limitation of the current MSIX format. However, with Advanced Installer , you can fix this limitation.
The solution is to have a stub/launcher used as an entry point instead of your main app. That launcher can, in the end, launch your application with the desired command line parameters.
Advanced Installer includes this stub automatically the moment you add a shortcut argument in your package, as detailed below.
Here are the steps:
- Import your current MSIX package into a new project in Advanced Installer or right-click-> Edit With Advanced Installer
- From the left pane, select Application definition/Application Details
- Under Start Point set your arguments in the “Arguments” field
- Build the MSIX package
Have you used MSIX shortcuts yet? How did it work for you?
Subscribe to Our Newsletter
Sign up for free and be the first to receive the latest news, videos, exclusive How-Tos, and guides from Advanced Installer.