MSIX Applications Configuration
To build an MSIX package you need to create at least one MSIX application configuration, where the application represents an MSIX entry point. It specifies an executable file and its startup configuration that is executed when you run the application. This concept is similar to Windows shortcuts, which refers the program executable file and contains configuration of the program execution settings. MSIX application entry is displayed in Windows Start menu after MSIX deployment similarly to shortcuts created after installing a regular Windows application.
If you repackage an existing Windows application into MSIX using monitoring, MSI Package Builder automatically detects all shortcuts and prompts you to select at least one of them as an MSIX application. All settings for the selected shortcut is converted to MSIX application properties automatically.
MSIX applications can be configured on the MSIX/AppX tab of Project Build Properties for a selected project. Applications displays all configured MSIX applications and allows you to add and delete applications using a context menu Pic 1.
The Generate MSIX/AppX Applications action of the context menu allows you to use Windows shortcuts entries of the project to create corresponding MSIX applications automatically. Alternatively, you can create new standard and web application entries and provide the configuration manually.
Standard Application Configuration
When you create a new standard application entry, you need to specify an application ID and Name to be displayed in the Windows Start menu. The Target field sets the path to an executable file. You can set an entry point of the application by selecting a file from those available in the project. The Parameters field specifies command-line parameters to be passed to the executable file when you run the application. You can leave them empty or set the required values. The Working Directory field sets a directory from those available in the project, to be used as a working directory of the application. The Run Mode sets whether the application window should be maximized, minimized or set to normal at start Pic 2.
You can set a description for the created application and choose the application icon. Click the Change Icon… button and choose one of the standard icons available, or specify a path to a file to import an icon from it.
If required, you can configure an MSIX application to run a PowerShell script before the application start or after completion of the application. You can provide the corresponding settings on the PowerShell Scripts tab Pic 3. Set a path to a script using the Script File field. If the script isn’t available on the machine where MSIX application will be executed, you can embed the specified script file to deploy the script together with MSIX. The Script Arguments field is used to set optional command-line parameters to be passed to the script. Script Execution Mode sets a power shell execution option. It is a safety feature that controls the conditions under which PowerShell loads configuration files and runs scripts. Use the execution mode suitable to run the selected script.
The Run Once option allows you to run the script only once, at the first time when MSIX application is executed. If it is enabled, the script isn’t executed on the second MSIX execution and all subsequent runs. If the Show PowerShell window option is enabled, the PowerShell console will be displayed when the script is running, so you can see the console output.
If you configure a script to run before MSIX application, you can configure the application to wait for the script to finish. The application can wait the script to finish as long as required, or you can set a timeout, so if this timeout is expired, the script is considered to exit with an error. It is possible to set if application execution should be skipped if the script returns an error.
Web Application Configuration
If MSIX deploys a web application, you can configure the web application entry point by creating a new web application configuration Pic 4.
To create a new web application set the application ID and the application Name to be displayed in Windows Start menu. In the Start Page field select an HTML file from those available in the project to be opened in the browser on application start. You can also specify a description and set the application icon if required.