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. It is similar to Repackaging an existing installation with the difference the capture is performed in a virtual machine (Hyper-V).

When performing the repackaging operation in a clean virtual machine, you assure no running application conflicts are generated. Also, the capture takes less time if the machine is clean. Moreover, if something goes wrong you can easily restore the virtual machine to a previous state. This is usually how installation tests are professionally handled.

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 in a virtual machine" then press the Edit link button.

Start New Capture

NoteOn 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).

3. Select the virtual machine host

You can use virtual machines from localhost or connect to remote Hyper-V hosts in your sub-network. Use the "New Server Connection" context menu option while Hyper-V Servers is selected in the left pane, then configure the connection credentials.

Repackaging Location

NoteThe following steps describe configuring the virtual machine environment. If you want to perform the repackaging operation on your local machine, you can follow Repackaging an existing installation tutorial.

4. Select the virtual machine profile

Select or configure the virtual machine profile with the snapshot to be used as host for the repackager then press [ OK ].

ImportantIt is important you first prepare the virtual machine before starting your first capture. In case of remote connections, having Advanced Installer tools installed on the VM is mandatory. Please check the requirements for repackaging in Hyper-V machines to make sure your environment is correctly setup.

Repackaging Location

Press [ Next ] in the parent dialog.

5. 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

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

6. 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.

7. 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 Profile

8. 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.


ImportantIf the repackager does not start running in your VM, it could be due to a changed configuration of your Autorun behavior from the guest OS installed in your VM. In this case you can launch the repackager manually from the guest OS, just open Windows Explorer and double-click our “Advanced Repackager“ virtual CD/DVD drive. To manually launch the guest instance of the Repackager, you can execute run.bat located in the root directory of the “Advanced Repackager“ virtual CD/DVD drive.

9. Package Installation

During this process your setup file will be launched inside the virtual machine 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.

10. 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.


11. Import results

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


12. 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.

13. Build Project

BuildBuild and run the project to test it.

The End

This concludes our tutorial.