Package Generator CLI

Command line options of Package Generator allows to automate building MSI, MSIX, APPX and APPV packages from a batch of capturing projects.

Warning

For building App-V, Package Generator must be run in the elevated mode.


Syntax:

"MsiGenerator.exe" <command> [--parameter "value"]

Usage:

"MsiGenerator.exe" build-msi --project "C:\PKG\Abc\project.mgp" --output-package "C:\PKG\Abc\package.msi"

The default installation path of MsiGenerator.exe is:

  • x64 OS: C:\Program Files (x86)\PACE Suite\MSI Generator\

  • x86 OS: C:\Program Files\PACE Suite\MSI Generator\


Commands:

Command

Description

build-msi

Build an MSI package from the project (.MGP file).

See parameters of the Build MSI command.

build-msix

Build an MSIX package from the project (.MGP file).

See parameters of the Build MSIX/APPX command.

build-appx

Build an APPX package from the project (.MGP file).

See parameters of the Build MSIX/APPX command.

build-appv

Build an App-V package from the project (.MGP file).

See parameters of the Build App-V command.


Build MSI

Parameters of the build-msi command:

Parameter

Obligatoriness

Description

--project

Mandatory

Defines a path to the MGP project file from which the MSI package will be generated.

Example: --project "C:\PKG\My Project 1\My Project 1.mgp"

--output-package

Optional

Defines a path and a name of the MSI file that will be generated. If the parameter is not set, the package will be generated in the <project folder>\MSI with the file name <project name>.

Example: --output-package "C:\PKG\package.msi"

--msi-settings-profile

Optional

Defines the MSI settings profile, rules of which will be applied to the generated package. If the parameter is not set, the default profile will be used (MENU > Settings > General > Default profile).

Example: --msi-settings-profile "default"

--product-name

Optional

Defines the Application name (displayed in the Application Details section of the Package tab for the MSI package format and saved to ProductName MSI property). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --product-name "App name"

--product-version

Optional

Defines the Version (displayed in the Application Details section of the Package tab for the MSI package format and saved to ProductVersion MSI property). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --product-version "1.0.0.0"

--product-publisher

Optional

Defines the Publisher (displayed in the Application Details section of the Package tab for the MSI package format and saved to Manufacturer MSI property). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --product-publisher "App publisher"

--product-language

Optional

Defines the Product language in the LANG_ID format (displayed in the Application Details section of the Package tab for the MSI package format and saved to ProductLanguage MSI property). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --product-language "1033"


Build MSIX/APPX

Parameters of the build-msix and build-appx commands:

Parameter

Obligatoriness

Description

--project

Mandatory

Defines a path to the MGP project file from which the MSIX/APPX package will be generated.

Example: --project "C:\PKG\My Project 1\My Project 1.mgp"

--output-package

Optional

Defines a path and a name of the MSIX/APPX file that will be generated. If the parameter is not set, the package will be generated in the <project folder>\AppX\Output with the file name <project name>.

Example: --output-package "C:\PKG\package.msix"

--display-name

Optional

Defines the Display name (displayed in the Display properties section of the Package tab for the MSIX package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --display-name "App name"

--publisher-display-name

Optional

Defines the Publisher display name (displayed in the Display properties section of the Package tab for the MSIX package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --publisher-display-name "App publisher"

--description

Optional

Defines the Description (displayed in the Display properties section of the Package tab for the MSIX package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --description "Package description"

--identity-name

Optional

Defines the Name (displayed in the Package identity section of the Package tab for the MSIX package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Important

This value must not contain spaces.

Example: --identity-name "AppIDName"

--identity-publisher

Optional

Defines the Publisher (displayed in the Package identity section of the Package tab for the MSIX package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Important

This value must begin with “CN=”.

Example: --identity-publisher "CN=App Publisher"

--identity-version

Optional

Defines the Version (displayed in the Package identity section of the Package tab for the MSIX package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Important

This value must be compliant with the quad annotation X.X.X.X.

Example: --identity-version "1.0.0.0"

--capabilities

Optional

Defines capabilities that will be declared in the package manifest file. If the parameter is not set, none of additional capabilities will be declared.

Supported values:

"*" - declare all capabilities that are listed on UI of Package Generator.
"" - do not declare capabilities
"Videos; User account information; Remote system" - declare only specific capabilities in format as they are displayed on UI of Package Generator.

Example: --capabilities "Videos; User account information"

--modification-for

Optional

Defines the package type (main or modification). If the parameter is not set, the main package type will be used.

Supported value:

"<identity.name>; <identity.publisher>" where <identity.name> is an identity name of the target package and <identity.publisher> is an identity publisher of the target package in format CN=publisher name

Important

identity.name value must not contain spaces.

Example: --modification-for "MyApp; CN=My Publisher"

--supported-platforms

Optional

Defines the list of supported platforms (target device families) on which, the MSIX/APPX package could be run. See List of platforms. If the parameter is not set, the Windows 10 (Desktop) platform will be used.

Supported values:

"*" - all platforms
"Windows.Desktop; Windows.Holographic; Windows7.Desktop" - set only the specific platforms. For Windows 10 platforms you can specify the MinVersion and MaxVersionTested in format <Windows 10 platform name>-<MinVersion>-<MaxVersionTested>.

Example: --supported-platforms "Windows.Desktop-10.0.14393.0-10.0.16294.0; Windows7.Desktop"

--sign-with-my-cert

Optional

Define that the MSIX/APPX package will be signed with the specified user certificate. If the parameter is not set, the package will not be signed.

Supported values:

"<certificate_path>; <certificate_password>" - use the specified certificate and password to sign the generated package.
"" - the same as not defined.

Example: --sign-with-my-cert "C:\Certificates\certificate.pfx; Qwerty123"

--sign-with-autogen-cert

Optional

Define that the MSIX/APPX package will be signed with the automatically generated self-signed certificate. If the parameter is not set, the package will not be signed.

Supported values:

"<certificate_password>" - generate the self-signed certificate with the specified password and sign the generated package with this certificate. The generated certificate will be saved to the folder with the package.
"" - the same as not defined.

Example: --sign "Qwerty123"

--compatible-architecture

Optional

Defines the compatible architecture for which the MSIX/APPX package. If the parameter is not set, the neutral architecture will be used.

Supported values:

"neutral"
"x86"
"x64"
"arm"
"arm64"

Example: --compatible-architecture "x86"

--app-installer

Optional

Defines if the AppInstaller file for deployment will be generated. If the parameter is not set, the AppInstaller file will not be generated.

Supported values:

"yes" - generate the AppInstaller file with default settings.
"no" or "" - the same as not defined.

Example: --app-installer "yes"


Build App-V

Parameters of the build-appv command:

Parameter

Obligatoriness

Description

--project

Mandatory

Defines a path to the MGP project file from which the APPV package will be generated.

Example: --project "C:\PKG\My Project 1\My Project 1.mgp"

--output-package

Optional

Defines a path and a name of the APPV file that will be generated. If the parameter is not set, the package will be generated in the <project folder>\App-V with the file name <project name>.

Example: --output-package "C:\PKG\package.appv"

--product-name

Optional

Defines the Application name (displayed in the Application Details section of the Package tab for the APPV package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --product-name "App name"

--product-version

Optional

Defines the Version (displayed in the Application Details section of the Package tab for the APPV package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --product-version "1.0.0.0"

--product-publisher

Optional

Defines the Publisher (displayed in the Application Details section of the Package tab for the APPV package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --product-name "App publisher"

--description

Optional

Defines the Description (displayed in the App-V Package Options section of the Package tab for the APPV package format). If the parameter is not set, the default value, obtained from the captured registry, will be used.

Example: --product-name "App publisher"

--appv-version

Optional

Defines the App-V version (displayed in the App-V Package Options section of the Package tab for the APPV package format). If the parameter is not set, the default value, the highest version will be used.

Supported values: | "5.2" - set the 5.2 (1607) appv version | "5.1" - set the 5.1 appv version | "5.0.3" - set the 5.0 SP3 appv version | "5.0.2.4" - set the 5.0 SP2 Hotfix 4+ appv version | "5.0.2" - set the 5.0 SP2 appv version | "5.0.1" - set the 5.0 RTM / SP1 appv version

Example: --appv-version "5.2"




Note

PACE Suite covers the whole range of application packaging tasks - learn more.

Try PACE Suite for free - 21 days no obligations unlimited trial with all functions unlocked.