Menu Close

Editing a package (edit)

This article is about the usage of command line interface. More information about CLI usage and how to get started can be found here: Command Line Interface (CLI) Reference

Editing of a package can be executed on one of the three supported sources:

  • A full path to an .msix or .appx file.
  • A full path to an extracted package directory
  • A full path to a package manifest file (AppxManifest.xml)

The command accepts a file path, followed by a sub-command, and then parameters valid for a given sub-command.

Getting started

Open any terminal window (Terminal, PowerShell or CMD) and type msixherocli.exe edit <path-to-edit> --help. This will show the list of available sub-commands. Each subcommand contains its own help. To invoke it, add to the previous command the accepted subcommand name, followed by the --help parameter.

For example, the following will show the documentation for sub-command addFile:

MSIXHeroCLI.exe edit c:\temp\my-package.msix addFile --help

Subcommand setIdentity

This sub-command sets package identity. It has the following syntax

MSIXHeroCLI.exe edit <path> setIdentity [--publisher <new-publisher-string>] [--packageVersion <new-package-version-or-update-pattern>] [--packageName <new-package-name>] [--resourceId <new-resource-id>] [--processorArchitecture <new-processor-architecture>]

All properties are optional, but at least one must be used for the command to work. The validation process will ensure, that the passed values are correct.


MSIXHeroCLI.exe edit c:\packages\package1.msix setIdentity --publisher "CN=MyName, DN=My Domain" --packageVersion "+.x.x.x"
MSIXHeroCLI.exe edit c:\packages\package1.msix setIdentity --processorArchitecutre x64

The following parameters are optional:

  • --packageName
    The new package name. This must be a valid value, according to MSIX requirements.
  • --publisher
    The new publisher name. This must be a valid DN string, for example CN=User, DN=domain, DN=local. Because the value may contain spaces, you should always enclose it with double quotes.
  • --packageVersion <new-package-version-or-update-pattern>
    The new package version, either as a full version string (for example or a literal tag auto, which will increase the current version on its fourth position (for example, changing current version to, or a pattern used to adapt the current package version. In the latter case, use * or x to take over the current value, and + or ^ to increase the current value by one. For example, using the following pattern *.*.+.0 would keep the major and minor version from the current value, increase the third position by one, and reset the fourth position to 0.
  • --processorArchitecture <new-processor-architecture>
    The new processor architecture, for example neutral or x64. This must be a valid value, according to MSIX requirements.
  • --resourceId <new-resource-id>
    The new resource ID. This must be a valid value, according to MSIX requirements.

The result of execution is a signed MSIX package. Depending on the selected certificate, the package may have a new identity due to a changed Publisher value (which should match the subject of the certificate). The program returns the following exit codes:

Exit codeMeaning
0The update has succeeded.
<any other>Internal exit code from makeappx.exe or pre-validation error.