Repackaging an existing installation

ImportantThe following article uses options that are available starting with the Architect edition and project type.

This tutorial will guide you in creating a project based on capturing an existing installation.

Lets suppose you have an older legacy installation package that does not use the industry standard Windows Installer technology. If you want to bring this installation up to date and benefit from the advantages of the latest Windows technologies you can easily convert your setup to a new Advanced Installer project.

As an alternative, you can perform the repackaging operation in a virtual machine as described in the Repackaging an existing installation in a VMware virtual machine tutorial.

This tutorial repackages the 7-zip File Manager into an MSI as an example.

1. Start a "Repackage Installation" project

If Advanced Installer is not currently running, launch it by double-clicking its desktop icon or selecting it from the "Start" menu. When the application starts, you will see a dialog where you can choose “Convert” > “Repackage Installation” project type.

New Repackage Installation Project

The Repackager Wizard will be launched assisting you to configure the new installation capture.

2. Choose to start a new installation capture

Select the option to "Repackage an application on this computer".

Start New Capture

On 64-bit operating systems, the Repackager tool automatically runs its x64 version, in order to accurately capture 64-bit installations. If you wish to override this default behavior and force the use of the 32-bit Repackager on 64-bit systems, you can use the /ForceX86 command line switch (Repackager.exe).

2.1 System Snapshots

An installation capture is done by comparing system snapshots taken before and after the package installation. Optionally filter the scan results using a system noise recording.

You can use an existing saved system snapshot as a starting point for the capture, using the option "Resume a repackaging operation".

Starting with Advanced Installer 13.6, before installation snapshots from a Virtual Machine can be reused for multiple packages, thus making the repackaging process a lot faster. To see more, check out this how to article.

3. Package Information

In this dialog you must select the location of the setup that you want to repackage. Also, you can specify additional behavioral options for the repackager, to optimize your flow.

Package Information

Additionally, you can configure multiple applications to be repackaged at once, use "Additional packages" link to add them.

4. Customize Settings

Select the output path for the installation capture files, and customize the capture profiles.

Customize Settings

When the "Use process monitor in conjunction with system scan" option is used the Repackager will ignore any output generated by processes which were already running before the repackaging operation starts.

Next we shall create a new installation capture profile that is best suited for our needs. Select "New Profile" from the "Current Profile" combo and click the link Edit.

5. Create installation profile

We created a new profile "7-zip Profile", which we have tweaked to search for system changes only in the "ProgramFiles" folder and in the "HKEY_LOCAL_MACHINE" registry hive, as the setup package installs per machine. All the other settings remained as in the "Default" profile.

We set this newly created profile as active (current). The profile that is "active" is that one that will be used during the system scan unless specified otherwise at the beginning of the installation capture.

Create installation profile

6. Installation Capture

Press [ Next ] to start the installation capture. Before you proceed make sure that you close all unnecessary running applications in order to avoid "false positive" capture results from active file and registry system access.


7. Package Installation

During this process your setup file will be launched with the command line you specified in the "Collect Information" page. Complete the installation as you would normally do.

After the installation has completed, the system will be scanned again for changes.

8. Finish

When the installation capture completes you can view a summary report indicating the system changes detected during package installation by pressing the View Repackager statistics link.


9. Import results

Press [ Finish ] button to import the installation capture results into a new Advanced Installer project.

Import results

10. Customize Project

After importing the installation capture results you should review the Advanced Installer project and adjust it to your new package deployment needs.

ImportantAt this point you don't need the old repackaged package or any of its dependencies. All necessary resources have been added next to the .RPK file in the repackager's output location.

11. Build Project

BuildBuild and run the project to test it.

The End

This concludes our tutorial.