Activation via Command Line
We explored how to activate a packaged application by its AppUserModelId (aka AUMID), but that’s not always convenient. Some tools only know how to run programs via a command line.
But fret not. You can activate apps via a command line.
AppExecutionAlias
The most popular option is to activate an app via its declared AppExecutionAlias.
A packaged app can define one or more app execution aliases. An execution alias behaves like a traditional command-line executable, but launching the alias actually activates the packaged application.
Let’s take the example we used to activate an app via AppUserModelId and add an AppExecutionAlias:
<?xml version="1.0" encoding="utf-8"?>
<Package ...>
<Identity Name="Contoso.PointOfSale"
Publisher="CN=Contoso LLC, O=Contoso LLC, L=Paris, C=France"
Version="1.2.3.4"
ProcessorArchitecture="x64" />
...
<Applications>
<Application Id="CardReader" Executable="PointOfSale.exe" ...>
...
<Extensions>
<uap5:Extension Category="windows.appExecutionAlias">
<uap5:AppExecutionAlias>
<uap5:ExecutionAlias Alias="cardreader.exe" />
</uap5:AppExecutionAlias>
</uap5:Extension>
</Extensions>
...
</Package>
Windows creates the app execution alias cardreader.exe for the user when the package is registered for a user.
Launching the alias activates the packaged application in the same way as activation via AUMID. Any command-line arguments are forwarded to the application, e.g.
cardreader.exe --merchant Contoso --device USB0
Execution aliases are often the simplest integration point for command-line tools, scripts, scheduled tasks, installers, and other software that expects to launch an executable rather than activate an application by AUMID.
Where are the aliases?
Registration creates the alias in the user’s profile1, e.g.
C:\Users\bob\AppData\Local\Microsoft\WindowsApps\cardreader.exe. This directory is included in the
user’s PATH, making aliases convenient for interactive as well as programmatic use.
If you look in the user directory, you’ll see *.exe files but their size is always 0 bytes.
Don’t Panic.
Alias files are special file system entries. The activation stack uses the alias to identify the actual executable file in a package to activate.
The executable was not copied out of the package’s install location. It remains where it was staged and all its integrity protection and enforcement intact.
Duplicate aliases
There’s nothing special or protected about an alias name. Multiple packages can (and do) define
the same alias, e.g. multiple graphics applications can declare <uap5:ExecutionAlias
Alias="paint.exe" />, but only one can exist in the user’s alias directory.
MSIX Deployment applies a “First Writer Wins” protocol to aliases when registering a package for a user: the alias is only written if no alias with the same name already exists.
An alias in C:\Users\bob\AppData\Local\Microsoft\WindowsApps is the moral equivalent to the
default application for a file type association. There can be only one default, or none.
A user can select which alias amongst dupes is enabled via the
Apps > Advanced app settings > App execution aliases page in Settings.
This shows the list of aliases across packages registered for the user, and which are enabled. When
multiple apps define the same alias, users can choose which app is activated.
Users can disable an app’s alias. For example, a user could disable Contoso’s PointOfSale
application’s cardreader.exe alias. If no other alias with the same name is enabled, attempts to launch
cardreader.exe will fail, as if the package never existed.
When no alias for a given name is enabled, Windows deletes the file system entry. For example, if no
cardreader.exe alias is enabled then
C:\Users\bob\AppData\Local\Microsoft\WindowsApps\cardreader.exe won’t exist.
User-configurable aliases are ideal for interactive use, but automation often requires a predictable launch target that isn’t affected by Settings preferences. Deployment also provides a stable package-specific alias.
Stable path to an alias
Deployment not only creates the alias in the user profile (if not already present). Package registration also creates the alias in a subdirectory named with the package family name.
This is unconditional, not controlled or modified by the user, and unaffected by Settings’
Apps > Advanced app settings > App execution aliases page.
For example:
[C:] DIR %LOCALAPPDATA%\Microsoft\WindowsApps
...
Directory of C:\Users\bob\AppData\Local\Microsoft\WindowsApps
...
11/17/2026 09:00 AM <DIR> Contoso.PointOfSale_eh4htm4n7tdre
...
11/17/2026 09:00 AM 0 cardreader.exe
...
[C:] DIR %LOCALAPPDATA%\Microsoft\WindowsApps\Contoso.PointOfSale_eh4htm4n7tdre
...
11/17/2026 09:00 AM <DIR> Contoso.PointOfSale_eh4htm4n7tdre
...
Registering this package for the user always creates e.g.
C:\Users\bob\AppData\Local\Microsoft\WindowsApps\Contoso.PointOfSale_eh4htm4n7tdre\cardreader.exe.
Activate via AUMID vs AppExecutionAlias
Windows supports activation via AUMID and AppExecutionAlias. Why choose one over the other?
AppExecutionAlias is the common preference for interactive use, as it looks and feels like any other executable from the user’s perspective. Plus Windows doesn’t include a convenient option to interactively launch an application by AUMID.
However, aliases must be declared by the developer in a package’s AppxManifest.xml. Aliases are
only created per the package’s definition.
If the package doesn’t specify an alias, there won’t be any aliases. Activation via AUMID would be required.
1 And of course, Windows deletes the alias in the user’s profile when the package is deregistered for the user. MSIX strives to cleanly uninstall any software it installs.
0 comments
Be the first to start the discussion.