I have an Win32 application ported to UWP using desktop bridge.
The application has both GUI and command-line interface (separate executables).
I'd like to have an icon and execution alias for the GUI interface, but only execution alias for the command-line interface. I do not want to pollute the Start menu with an icon no one will ever use.
For that I've understood that the manifest needs to include two Application
elements, one for the GUI and one for the command-line interface, as one Application
can include only one AppExecutionAlias
.
See also Create a Universal Windows Platform console app.
My idea was something like this:
<Applications>
<!-- GUI -->
<Application Id="MyApp" Executable="MyApp.exe" EntryPoint="Windows.FullTrustApplication">
<!-- with icon -->
<uap:VisualElements DisplayName="MyApp" Description="MyApp" ...>
...
</uap:VisualElements>
<!-- and execution alias -->
<Extensions>
<uap5:Extension Category="windows.appExecutionAlias"
Executable="MyApp.exe" EntryPoint="Windows.FullTrustApplication">
<uap5:AppExecutionAlias>
<uap5:ExecutionAlias Alias="MyApp.exe" />
</uap5:AppExecutionAlias>
</uap5:Extension>
</Extensions>
</Application>
<!-- Command-line interface -->
<Application Id="MyApp-commandline" Executable="MyApp-commandline.exe"
EntryPoint="Windows.FullTrustApplication">
<!-- with execution alias only -->
<Extensions>
<uap5:Extension Category="windows.appExecutionAlias"
Executable="MyApp-commandline.exe" EntryPoint="Windows.FullTrustApplication">
<uap5:AppExecutionAlias>
<uap5:ExecutionAlias Alias="MyApp-commandline.exe" />
</uap5:AppExecutionAlias>
</uap5:Extension>
</Extensions>
</Application>
</Applications>
But I cannot find out how (if even possible) to have Application
with no icon, as it seems that the VisualElements
part is mandatory. So the above manifest is invalid. Of it there's some trick to an additional another execution alias (for a different binary) to the (first and only) Application
.