Note

You are not reading the most recent version of this documentation. See the latest version available.

MSI Generator command line

MSI Generator supports command line options that allows automation of the capturing (repackaging) process. It is assumed that the user creates a short script for running the pre-install and post-install scans with MSI Generator, (see example at the page bottom) apply the exclusion filters to the captured resources and generate the package.

Warning

MSI Generator must be run with the administrative privileges.


Syntax:

"MsiGenerator.exe" <command> [parameters]

Usage:

"MsiGenerator.exe" -snapshot snapshotPath (scaningAreas)
"MsiGenerator.exe" -compare firstSnapshotPath secondSnapshotPath projectFolderPath packageName
"MsiGenerator.exe" -buildPackage projectPath msiPackagePath profileName

Note that the parameters order is important.


Commands:

<command>

Description

-snapshot

Record a state of the file system and registry into the snapshot.

-compare

Compare two taken snapshots (usually pre-install and post-install ) to discover changes that were made to the system. The detected changes will be saved to the project.

-buildPackage

Generate an MSI package from the project.

Note

Since version 5.3.2 PACE Suite builds MSI packages with the UTF-8 code page of a database. A package with this encoding is capable of installing resources with extended characters in the titles.


Parameters of the -snapshot command:

[parameter]

Obligatoriness

Description

snapshotPath

Mandatory

Defines the absolute path to and the name of the snapshot that will be created. Please use the default snapshot extension .msgn.

Example: "C:\Snapshots\snapshot_N.msgn"

scaningAreas

Optional

Defines what system areas will be scanned. If this parameter is not set, all areas will be scanned.

Supported scanning areas:

registry
registry="*" scan all registry
registry="" do not scan registry
registry="HKLM HKCU HKU\.DEFAULT" scan specific hives, separated by space.
localdrives
localdrives="*" scan all drives
localdrives="" do not scan drives
localdrives="C: D: E:" scan specific drives, separated by space.
permissions
permissions="true" scan for permission changes
permissions="false" do not scan.
services
services="true" scan services
services="false" do not scan services.
devices
devices="true" scan printers
devices="false" do not scan printers

Warning

At least either one local drive or one registry hive must be set to take a system snapshot.

Take the pre-install and post-install snapshots with the same scanning areas to be able to compare them later.

Example 1: registry="" localdrives="C:" permissions="true" services="false" devices="false"
Example 2: registry="HKLM HKCU" localdrives="" permissions="true" services="false" devices="false"

Parameters of the -compare command:

[parameter]

Obligatoriness

Description

firstSnapshotPath

Mandatory

Defines the absolute path to the first (pre-install) snapshot. The second (post-install) snapshot will be compared against this snapshot.

Example: "C:\Snapshots\snapshot_1.msgn"

secondSnapshotPath

Mandatory

Defines the absolute path to the second (post-install) snapshot.

Example: "C:\Snapshots\snapshot_2.msgn"

projectFolderPath

Mandatory

Defines the absolute path to the common output folder for projects.

Note

The created project file will be placed to the common output folder using the following structure: <packageName>\<packageName>.mgp. Where packageName is the next parameter.

Example: "C:\Projects"

packageName

Mandatory

Defines names of the project subfolder, project file, MSI package file.

Example: "PACE Suite 5.3"


Parameters of the -buildPackage command:

[parameter]

Obligatoriness

Description

projectPath

Mandatory

Defines the absolute path to the MGP project file from which the MSI package will be created.

Example: "C:\Projects\PACE Suite 5.3\PACE Suite 5.3.mgp"

msiPackagePath

Mandatory

Defines the absolute path to and the name of the MSI package that will be generated from the MGP project file.

Note

If the applied MSI Settings Profile (i.e. profileName) defines package compression type as Uncompressed files, consider saving the MSI package to the additional subfolder in order to eliminate conflicts between the package external files and project resources.

Example: "C:\Projects\PACE Suite 5.3\MSI\pace_suite_5.3.msi"

profileName

Mandatory

Defines a name of the MSI Settings Profile that will be used for creating the MSI package. The MSI Settings Profile defines MSI package settings such as compression type, summary information, the use of advertising tables, default properties, per-user data handing and many more.

Example: "default"

productName

Optional

Supported since version 5.3.2:

Defines the Application name (displayed on the Package > MSI tab in the Application Details section). If not defined, the default value obtained from the captured registry will be used.

Example: productName="App name"

productVersion

Optional

Supported since version 5.3.2:

Defines the Version (displayed on the Package > MSI tab in the Application Details section). If not defined, the default value obtained from the captured registry will be used.

Example: productVersion="1.0.0.0"

productPublisher

Optional

Supported since version 5.3.2:

Defines the Publisher (displayed on the Package > MSI tab in the Application Details section). If not defined, the default value obtained from the captured registry will be used.

Example: productPublisher="App publisher"

productLanguage

Optional

Supported since version 5.3.2:

Defines the Product language LANG_ID (displayed on the Package > MSI tab in the Application Details section). If not defined, the default value obtained from the captured registry will be used.

Example: productLanguage="1033"


Example:

Note

By default, MsiGenerator.exe could be found at C:\Program Files (x86)\PACE Suite\MSI Generator\. The path may differ, if you have changed the default PACE Suite installation directory.

REM Running pre-install scanning (taking first snapshot)
"C:\Program Files (x86)\PACE Suite\MSI Generator\MsiGenerator.exe" –snapshot "C:\Snapshots\snapshot_1.msgn" registry="*" localdrives="C:" permissions="true" services="true" devices="true"

REM Running source installation
<command to run the source installation in the unattended mode>

REM Running post-install scanning (taking second snapshot)
"C:\Program Files (x86)\PACE Suite\MSI Generator\MsiGenerator.exe" –snapshot "C:\Snapshots\snapshot_2.msgn" registry="*" localdrives="C:" permissions="true" services="true" devices="true"

REM Creating project (comparing first and second snapshots)
"C:\Program Files (x86)\PACE Suite\MSI Generator\MsiGenerator.exe" –compare "C:\Snapshots\snapshot_1.msgn" "C:\Snapshots\snapshot_2.msgn" "C:\Projects" "PACE Suite 5.3"

REM Building MSI package from project
"C:\Program Files (x86)\PACE Suite\MSI Generator\MsiGenerator.exe" –buildPackage "C:\Projects\PACE Suite 5.3\PACE Suite 5.3.mgp" "C:\Projects\PACE Suite 5.3\MSI\pace_suite_5.3.msi" "default"



Note

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

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