Edit MSIX projects using Command Line

This article will present the commands for editing an MSIX Advanced Installer project using Command Line.

1. Package

Command Syntax:

/SetUwpAppxPackageProperties  -id <id>
                              -display_name <display_name>
                              -description <description>
                              -version <version>
                              [-integrity {on|off|default}]
                              [-supported_users {single|multiple}]
                              [-allow_execution {yes|no}]

This command can be used to edit the options found in the Package section of Package Information page.

Parameters:

  • -id <id> - The unique identifier name of the MSIX package
  • -display_name <display_name> - The name of the MSIX package that will be displayed to the users
  • -description <description> - A friendly description that can be displayed to users
  • [-integrity {on|off|default}] - Select the level of run time package integrity checks and remediation for the package
  • [-supported_users {single|multiple}] - Specify if the package is multi-user compatible
  • [-allow_execution {yes|no}] - Specify if the executable contained by the package is allowed to execute.

2. Publisher

Command Syntax:

/SetUwpAppxPackagePublisher  -id <id>
                             -display_name <display_name>

This command can be used to edit the options found in Publisher section of Package Information page.

Parameters:

  • -id <id> - The Publisher ID
  • -display_name <display_name>- A friendly name for the publisher that can be displayed to users

3. Migration

Command Syntax:

/SetUwpAppxPackageMigrationOptions  -uninstall_code <uninstall_code>
                                    -user_data_folder <user_data_folder>
                                    [-ui_level {AskAboutMigration|AutoMigrate}]

This command can be used to edit the options found in Migration section of Package Information page.

Parameters:

  • -uninstall_code <uninstall_code> - The actual Upgrade Code of your app
  • -user_data_folder <user_data_folder> - The subfolder containing your app's user data
  • -ui_level {AskAboutMigration|AutoMigrate} - Ask user about data migration | Automatically migrate user data

4. Virtualization

Command Syntax:

/SetUwpAppxPackageVirtualization  [-file_system {yes|no}]
                                  [-registry {yes|no}]

This command can be used to edit the options found in Virtualization section of Package Information page.

Parameters:

  • [-file_system {yes|no}] - Enables virtualization for the file system entries of your application
  • [-registry {yes|no}] - Enables virtualization for the registry entries of your application

5. Package Dependencies

Command Syntax:

/AddUwpAppxPackageDependency  -name <name>`
                              -publisher <publisher>
                              -min_version <min_version>
                              -max_major_version <max_major_version>
                              [-optional]

This command adds a new package dependency. For more information see: Package Dependencies tab from Dependencies page.

Parameters:

  • -name <name> - The name as it appears in the ID field from the Package section of Package Information Page
  • -publisher <publisher> - The publisher as it appears in the ID field from the Publisher section of Package Information Page.
  • -min_version <min_version> - The minimum version of the dependency package. The value is a string in quad notation(e.g. "Major.Minor.Build.Revision")
  • -max_major_version <max_major_version> - The maximum version of the dependency package tested against
  • [-optional] - Enable this option if you want the dependency to be optional for the app

6. General Application Details

Command Syntax:

/SetUwpAppxAppProperties  -current_id <current_id>
                          -new_id <new_id>
                          -display_name <display_name>
                          -description <description>
                          [-app_list_entry {NotSpecified|None|Default}]
                          [-multiple_instances {yes|no}]
                          [-console_app {yes|no}]

This command can be used to edit the Supported options found in General section of Application Details page.

Parameters:

  • -current_id <current_id> - The current unique identifier of the application or package-relative app identifier (PRAID)
  • -new_id <new_id> - The new unique identifier of the application or package-relative app identifier (PRAID)
  • -display_name <display_name> - A friendly name for the app that can be displayed to users
  • -description <description> - The description of the app
  • [-app_list_entry {NotSpecified|None|Default}] - Provides the app display information such as name, description, and a method to launch the app
  • [-multiple_instances {yes|no}] - Declare the application as a multi-instanced UWP app
  • [-console_app {yes|no}] - Declare the application as a console UWP app

7. Start Point

The following commands can be used to edit the options found in Start Point section of Application Details page.

Command Syntax:

/SetUwpAppxAppEntryPoint  -id <id>  
                          -executable <executable>  
                          -entry_point <entry_point>   
                          -parameters <parameters>   
                          -working_directory <working_directory>   
                          [-run_mode {Normal|Maximized|Minimized}] 

Parameters:

  • -id <id>
  • -executable <executable> - Select the default launch batch file for UWP app or executable file
  • -entry_point <entry_point> - Specify the ID of the class that is run when the app is activated
  • -parameters <parameters> - Specify the command line parameters (arguments) for the application
  • -working_directory <working_directory> - Specify the working directory of the launch executable file for the app
  • [-run_mode {Normal|Maximized|Minimized}] - Sets the application main-window mode at start

Command Syntax:

/SetUwpAppxAppStartPage  -id <id>  
                         -start_page <start_page>
 

Parameters:

  • -id <id>
  • -start_page <start_page> - Specify the default launch HTML page for the Windows Store app using JavaScript.

Command Syntax:

/ResetUwpAppxAppStartPoint  -id <id>  
 

Parameters:

  • -id <id>

ImportantThe /ResetUwpAppxAppStartPoint is used to set the Start Point to None. At least one of the applications must have a start point thus this command will only work if there are multiple applications and at least one of them has a start point.

8. Supported Rotations

Command Syntax:

/SetUwpAppxAppOrientations  -id <id>
                            [-portrait {yes|no}]
                            [-portrait_flipped {yes|no}]
                            [-landscape {yes|no}]
                            [-landscape_flipped {yes|no}]

This command can be used to edit the options found in Supported Rotations section of Application Details page.

Parameters:

  • -id <id>
  • [-portrait {yes|no}] - Select the Portrait orientation
  • [-portrait_flipped {yes|no}] - Select the Portrait-flipped orientation
  • [-landscape {yes|no}] - Select the Landscape orientation
  • [-landscape_flipped {yes|no}] - Select the Landscape-flipped orientation

9. Resource Group

Command Syntax:

/SetUwpAppxAppResourceGroup  -id <id>
                             -resource_group <resource_group>

This command can be used to edit the options found in View section of Application Details page.

Parameters:

  • -id <id> - The ID of the App
  • -resource_group <resource_group> - Specify the Resource Group

10. Notifications

Command Syntax:

/SetUwpAppxAppLockScreen  -id <id>
                          [-lock_screen {(none)|OnlyBadge|BadgeAndText}]

This command can be used to edit the options found in Notifications section of Application Details page.

Parameters:

  • -id <id> - The ID of the App
  • [-lock_screen {(none)|OnlyBadge|BadgeAndText}] - Configure lock and splash screen notifications

11. Tile Update

Command Syntax:

/SetUwpAppxAppTileUpdate  -id <id>
                          [-recurrence {None|Halfhour|Hour|Sixhours|Twelvehours|Daily}]
                          -uri_template <uri_template>

This command can be used to edit the options found in Tile Update section of Application Details page.

Parameters:

  • -id <id> - The ID of the App
  • [-recurrence {None|Halfhour|Hour|Sixhours|Twelvehours|Daily}] - The recurrence interval for tile update notifications
  • -uri_template <uri_template> - The URI template for tile update notifications

12. Content URIs

Command Syntax:

/AddUwpAppxAppContentUri  -id <id>
                          -uri <uri>
                          [-rule {Include|Exclude}]
                          [-winrt_access {None|All|AllowForWebOnly}]

This command can be used to add a new Content URI to your project. For more information see: Content URIs page.

Parameters:

  • -id <id> - The ID of the App
  • -uri <uri> - The URI to use in the rule
  • [-rule {Include|Exclude}] - Specify whether the rule is an inclusion or exclusion rule
  • [-winrt_access {None|All|AllowForWebOnly}] - Declares UWP (Windows Runtime) access from remote sites. This attribute gives control to a developer to specify the set of URIs that can access UWP APIs from their website

13. Add Build

/AddBuild  -name <name>
           [-type {MSI|EXE|MSIX|App-V}]

This command can be used to add a new Build to your project.

Parameters:

  • -name <name> - The name of the new build
  • type {MSI|EXE|MSIX|App-V}] the type of build to be created

14. Delete Build

/DeleteBuild  -name <name>

This command can be used to delete a Build from your project.

Parameters:

  • -name <name> - The name of the build to be deleted

15. Build Output

Command Syntax:

/SetUwpAppxBuildOutput  -name <name>
                        -output_folder <output_folder>
                        -output_name <output_name>

This command can be used to edit the options found in the Output section from Configuration tab of Builds Page.

Parameters:

  • -name <name> - The name of the build
  • -output_folder <output_folder> - The MSIX/AppX package build path
  • -output_name <output_name> - The MSIX/AppX package file name

16. Build Architecture

Command Syntax:

/SetUwpAppxBuildArchitectures  -name <name>
                               [-neutral {yes|no}]
                               [-x86 {yes|no}]
                               [-x64 {yes|no}]
                               [-arm {yes|no}]
                               [-arm64 {yes|no}]

This command can be used to edit the build Architectures option found in Packaging section from Configuration tab of Builds page.

Parameters:

  • -name <name> - The name of the build
  • [-neutral {yes|no}] - set neutral architecture
  • [-x86 {yes|no}] - set x86 architecture
  • [-x64 {yes|no}] - set x86 architecture
  • [-arm {yes|no}] - set arm architecture
  • [-arm64 {yes|no}] - set arm64 architecture

17. Distribution

Command Syntax:

/SetUwpAppxBuildPackaging  -name <name>
                           [-use_bundle {yes|no}]
                           [-upload_to_store {yes|no}]

This command can be used to edit the Distribution option found in Packaging section from Configuration tab of Builds page.

Parameters:

  • -name <name> - The name of the build
  • [-use_bundle {yes|no}] - Create an APPX/MSIX bundle that can target multiple architectures
  • [-upload_to_store {yes|no}] - Select Microsoft Store distribution option

18. AppInstaller

Command Syntax:

/SetUwpAppxBuildAppInstaller  -name <name>
                              -url <url>
                              -freq_check <freq_check>
                              [-show_prompt {yes|no}]
                              [-updates_block_activation {yes|no}]
                              [-automatic_background_task {yes|no}]
                              [-force_update_from_any_version {yes|no}]

This command can be used to edit the options found in App Installer tab of Builds Page.

Parameters:

  • -name <name> - The name of the build
  • -url <url> - The URL path of the AppInstaller file
  • -freq_check <freq_check> - How often will Windows check if your application has pending updates (hours)
  • [-show_prompt {yes|no}] - Informs the user about the update through a prompt.
  • [-updates_block_activation {yes|no}] - Stops the user from launching the application until the update has been installed
  • [-automatic_background_task {yes|no}] - With this option enabled, periodic checks for updates are made in the background even if the application was not launched
  • [-force_update_from_any_version {yes|no}] - Enables updating from a higher version to a lower version