Repackaging an installation in Oracle VM VirtualBox

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

NoteThe following tutorial explains how to use the RDP connection integration from the Repackager to run inside an Oracle VM VirtualBox guest OS. If you want to perform the repackaging in VMWare or Hyper-V check Repackaging an installation on a VMware virtual machine or Repackaging an installation on a Hyper-V virtual machine tutorials.

The following steps guide you in creating a project based on capturing an installation. As an example, we'll repackage the WinSCP File Manager EXE into an MSI.

1. Create a Repackage Installation project

Launch Advanced Installer and go to IT Pros tab contained by Start Page. Then choose “Convert” > “Repackage Installation” project type.

New Repackage Installation Project

The Repackager launches and the project is saved as a .rpp file on disk.

2. Setting up the Repackager

After you select what installer you want to repackage, in our case WinSCP exe installer, you can begin configuring the operation.

Caution!If you repackage in other machines (Other Servers options in Virtual Machines Profiles), our Repackager will copy the whole content of the folder in which the package to be repackaged is located. To avoid unncecessary time-consuming copy operations it is recommended to place the package and its dependencies in an empty folder.

2.1 Package Information

The package information from the installer is displayed here. You can also configure multiple applications to be repackaged at once, use "Additional packages" link to add them. For more information about this tab see this page.

Package Information

2.2 Customize Options

The Options tab lets you choose actions and configurations for the repackaging operation. For more information about this tab see this page.

There are a few options that are checked by default, but for this tutorial, we also check "Generate .bat file with settings from this session," which creates a .bat file for automation in future repackaging operations.

Customize Options

2.3 Create and configure a virtual machine profile

2.3.1 Create a virtual machine profile

Press on the down arrow on the "Start in VM" toolbar button and select "Edit Virtual Machine profiles."

Configure VM Profiles

In the Virtual Machine Profiles dialog create a new profile by right-clicking on "Other Servers" and selecting "New server connection." A new profile will be automatically created along with the new server connection.

Edit VM Profiles

2.3.2 Install and configure Advanced Installer Tools

For an easy workflow, it is a good idea to create a shared folder to be used for resources shared between the VM and the local machine.

To prepare the virtual machine before starting your first capture you have to install Advanced Installer Tools in the VM .

Just click on "Advanced Installer Tools path" hyperlink from Edit VM Profiles view and copy osprovision.exe to the shared folder and then install it in the VM.

After the installation, Advanced Installer Tools will be launched and its icon will be displayed in the System Tray.

The next step is to enable the connection between the repackager and the remote machine. To achieve this click on "Enable Remote connection (WinRM)" hyperlink from Advanced Installer Tools:

AI Tools

After the connection has been enabled, a certificate will be generated. This certificate is used to ensure a secure connection between the host and the virtual machine. You can easily access the certificate by clicking on "Certificate path" hyperlink.

Copy the certificate in the shared folder to be able to access it later in the local machine.

2.3.3 Configure the virtual machine profile

Return to "Other Servers" section of Repackager's Edit VM Profiles view and specify the Server name (either the computer name or its IP address) and the Credentials Authentication.

Then select the certificate from the shared folder.

VM Settings

2.4 Create an installation profile

Press the "Configuration Manager" button from the Home tab and begin to customize your capture profile.

Create a new profile "MyProfile," 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. The profile that is "active" is that one that is used during the system scan unless specified otherwise at the beginning of the installation capture.

Create installation profile

3. Installation capture

Before you proceed, make sure that you close all unnecessary running applications to avoid "false positive" capture results from active file and registry system access.

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.

To begin the installation press the "Start in VM" button Run in VM.

Progress installation

4. Package installation

The package is launched, and after the installation is complete, the system is scanned again for changes.

Package installation

The result is saved as a session under History and as a .rpk file on the disk.

Press "Continue in Advanced Installer" to make the final touches on the newly repackaged installer.

Repakage completed

5. Import results

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

6. Customize the project

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

7. Run project

RunBuild and run the project to test the newly created installer.

8. Video tutorial

How Repackaging Works in Remote Machines - Oracle VM VirtualBox