Repackaging Commands

MSI Package Builder enables you to convert an existing installation into an MSI, App-V, or MSIX/AppX package. When you execute the repackaging command, the software initiates the targeted installation on your local machine and starts monitoring. You should complete the installation steps as usual, while the program records the changes. Finally, it generates a package in the chosen format, incorporating your specified configuration parameters.

MSI Packaging

To repackage an installation into an MSI package you can run the following command:

PackageBuilderCMD.exe -repackage-msi <application-path> [-x <application-params>] <package-path> [-r <project-path>] [-s] [-m <manufacturer>] [-n <product-name>] [-l <language-id>] [-v <version>] [-p <x86|x64>] [-g <guid>] [-u <guid>]

Parameter

Optional

Description

application-path

No

The path to the installation to be monitored (*.exe, *.bat, *.cmd, *.msi, *.msp file types are supported).

package-path

No

The path to the MSI package output file.

-x <application-params>

Yes

Command-line parameters of the installation.

-r <project-path>

Yes

Path to the project to be created, including the project name.

-s

Yes

Run command in Windows Sandbox.

-m <manufacturer>

Yes

Set the manufacturer for the generated MSI package.

-n <product-name>

Yes

Set the product name for the generated MSI package.

-l <language-id>

Yes

Set the MSI package language.

-v <version>

Yes

Set the MSI package version.

-p <x86|x64>

Yes

Set the MSI package platform.

-g <guid>

Yes

Set the product GUID for the generated MSI package.

-u <guid>

Yes

Enable an upgrade for the generated MSI package with the specified GUID.

Example:

PackageBuilderCMD.exe -repackage-msi c:\Downloads\AdobeReaderInstaller.exe c:\Packages\AdobeReader.msi

When performing repackaging, you must specify only the path to the repackaged installation and the path for the generated package; other parameters are optional. Repackaging is performed by default on the local machine, therefore, ensure your repackaging environment follows the repackaging best practices. Use a clean VM for repackaging, where MSI Package Builder is installed only. If you prefer repackaging in Windows Sandbox, specify the corresponding command-line option.

Other configuration parameters are the same as specified during in the GUI in the Project Details view, so you can enter them for the product name, manufacturer, package language, version, and platform. For packages designed to upgrade, set the necessary product GUID and upgrade GUID.

App-V Packaging

To repackage an installation into an App-V package you can run the following command:

PackageBuilderCMD.exe –repackage-appv <application-path> [-x <application-params>] <package-path> [-r <project-path>] [-s] [-m <manufacturer>] [-n <product-name>] [-l <language-id>] [-v <version>] [-p <x86|x64>] [-g <guid>]

Parameter

Optional

Description

application-path

No

The path to the installation to be monitored (*.exe, *.bat, *.cmd, *.msi, *.msp file types are supported).

package-path

No

The path to the App-V package output file.

-x <application-params>

Yes

Command-line parameters of the installation.

-r <project-path>

Yes

Path to the project to be created, including the project name.

-s

Yes

Run command in Windows Sandbox.

-m <manufacturer>

Yes

Set the manufacturer for the generated App-V package.

-n <product-name>

Yes

Set the product name for the generated App-V package.

-l <language-id>

Yes

Set the App-V package language.

-v <version>

Yes

Set the App-V package version.

-p <x86|x64>

Yes

Set the App-V package platform.

-g <guid>

Yes

Set the product GUID for the generated App-V package.

Example:

PackageBuilderCMD.exe -repackage-appv c:\Downloads\AdobeReaderInstaller.exe c:\Packages\AdobeReader.appv

The command-line parameters used for App-V generation closely mirror those for generating MSI packages, as detailed in the previous section.

MSIX/AppX Packaging

To repackage an installation into an MSIX/AppX package you can run the following command:

PackageBuilderCMD.exe -repackage-appx <application-path> [-x <application-params>] <package-path> [-r <project-path>] [-s] [-m <manufacturer>] [-n <product-name>] [-l <language-id>] [-v <version>] [-p <x86|x64>] [-a <package-name>] [-u <publisher>] [-d <package-description>]

Parameter

Optional

Description

application-path

No

The path to the installation to be monitored (*.exe, *.bat, *.cmd, *.msi, *.msp file types are supported).

package-path

No

The path to the MSI package output file.

-x <application-params>

Yes

Command-line parameters of the installation.

-r <project-path>

Yes

Path to the project to be created, including the project name.

-s

Yes

Run command in Windows Sandbox.

-m <manufacturer>

Yes

Set the manufacturer for the generated MSIX/AppX package.

-n <product-name>

Yes

Set the product name for the generated MSIX/AppX package.

-l <language-id>

Yes

Set the MSIX/AppX package language.

-v <version>

Yes

Set the MSI/AppX package version.

-p <x86|x64>

Yes

Set the MSI/AppX package platform.

-a <package-name>

Yes

The package name.

-u <publisher>

 

The name of the package publisher (in the Relative Distinguished Name (RDN) format).

-d <package-description>

 

The package description.

Example:

PackageBuilderCMD.exe -repackage-appx c:\Downloads\AdobeReaderInstaller.exe c:\Packages\AdobeReader.msix

The command-line parameters used for MSIX/AppX generation closely mirror those for generating MSI packages, as detailed in the previous section. You can also specify MSIX/AppX-specific properties, including the package name, publisher, and description.