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 |
|---|---|
|
Record a state of the file system and registry into the snapshot. |
|
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. |
|
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 |
|---|---|---|
|
Mandatory |
Defines the absolute path to and the name of the snapshot that will be created.
Please use the default snapshot extension Example: |
|
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 registryregistry="" do not scan registryregistry="HKLM HKCU HKU\.DEFAULT" scan specific hives, separated by space.localdrives
localdrives="*" scan all driveslocaldrives="" do not scan driveslocaldrives="C: D: E:" scan specific drives, separated by space.permissions
permissions="true" scan for permission changespermissions="false" do not scan.services
services="true" scan servicesservices="false" do not scan services.devices
devices="true" scan printersdevices="false" do not scan printersWarning 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 |
|---|---|---|
|
Mandatory |
Defines the absolute path to the first (pre-install) snapshot. The second (post-install) snapshot will be compared against this snapshot. Example: |
|
Mandatory |
Defines the absolute path to the second (post-install) snapshot. Example: |
|
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: Example: |
|
Mandatory |
Defines names of the project subfolder, project file, MSI package file. Example: |
Parameters of the -buildPackage command:
[parameter] |
Obligatoriness |
Description |
|---|---|---|
|
Mandatory |
Defines the absolute path to the MGP project file from which the MSI package will be created. Example: |
|
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. Example: |
|
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: |
|
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: |
|
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: |
|
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: |
|
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: |
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.