InstallAware for Windows Installer Header Image Windows Installer without Rocket Science
InstallAware for Windows Installer
 

PackageAware

PackageAware is an intelligent wizard that captures the changes a setup makes to a system. You may use PackageAware to monitor the results of any installation, and it will create a ready-to-use installation project that can be immediately built in InstallAware. PackageAware provides a very easy way to migrate legacy installations into Windows Installer, and InstallAware.

Preparing to use PackageAware

InstallAware recommends that you use clean-machines while capturing setups. A clean machine is a plain installation of Microsoft Windows with no other software installed (and ideally, no optional Windows components installed either). Clean machine captures are more efficient in setup repackaging because they more closely reflect the target systems your applications will be installed on. Also, they may already contain some of the files and settings that are being installed by the captured setup. When those files and settings are already present on the system, PackageAware will not see them as new additions, and therefore fail to detect all components that have been installed by the captured setup.

In addition, the usage of virtualization software such as EMC VMware or Microsoft Hyper-V is strongly recommended. Virtualization software enable developers to boot more than one operating system simultaneously from their desktop, easily passing files and data between one another. Using virtualization software during setup captures dramatically increases productivity.

Using PackageAware

To use PackageAware, follow the steps below.

Preparing to use PackageAware

  1. Prepare a clean machine, ideally in a virtualized environment, that you will be using while capturing your setup. You do not need to install InstallAware onto this clean machine.
  2. On the computer where you do have InstallAware installed, in the Start Menu group for InstallAware, click Setup Capture. Copy the file PackageAware.exe to your capture system.
  3. Double-click this file on your capture system. The PackageAware wizard launches.

When you have prepared to use PackageAware, select a capture mode.

Selecting a Capture Mode

Starting with InstallAware 15, PackageAware provides two different setup capture modes:

Direct Capture Mode

To immediately capture a setup on the clean machine, choose Capture an installation and click Next to continue.

This is the fastest setup capture method available and may be selected unless there is a specific reason not to.

Snapshot Mode

To create a snapshot based on the current state of the machine, choose Create a snapshot and click Next to continue.

The snapshot based approach enables you to compare any arbitrary two system states (including system states obtained on completely different operating systems and/or underlying hardware).

It may be desirable to use the snapshot based approach over the direct capture approach for a variety of reasons, including the ability to save captured system snapshots and compare any two arbitrary snapshots at any time.

Selecting Capture Filters

Starting with InstallAware X6, PackageAware provides multiple stackable capture filters, eliminating noise captured during installation monitoring.

To capture all changes on a system including changes highly suspect as being irrelevant to the installation you are capturing, clear all check boxes here. Otherwise, check the boxes for one or more of the filters designed to eliminate a particular kind of activity from a capture operation.

If you would like to customize the built-in file system and registry filters, or to create new filters of your own, click the Edit Filters button. You may now edit all built-in filters or create your own, and use them during your capture process.

Capturing an Installation

When you have selected your capture mode and capture filters, continue with the steps below.

  1. If you are capturing a 64 bit application, check the Scan in native 64 bit mode check-box. This option is only available when running PackageAware on 64 bit operating systems.
  2. Click Next to scan the host system for all existing files and registry data.
  3. While the scan is in progress, do not use the capture machine.
  4. When the scan is finished, if you are running PackageAware in the snapshot mode, click the Finish button and save your snapshot. This step does not apply when running PackageAware in direct capture mode.
  5. If you are running inside a virtualized environment, take a virtual machine snapshot (consult your virtualization product documentation for more information on how to take new snapshots). This way, you may skip the steps above the next time you are virtualizing an application, by starting from this snapshot which already has PackageAware running with the pre-install scan data already collected.
  6. Run the setup for the application you wish to capture. If you are capturing more than one setup, you may run all of them before returning to PackageAware. If one of the setups you ran requested a reboot, restart the capture machine as requested. Rebooting the capture machine, even if none of the captured setups requested it, is a recommended practice. PackageAware survives reboots and continues to collect data in direct capture mode. In snapshot mode, you may need to manually restart PackageAware.
  7. When you have finished making the changes to the capture machine (all setups and reboots finalized), click Next to scan the host system for all new files and registry data if you are running PackageAware in direct capture mode. If you are running PackageAware in snapshot mode instead, choose Create a snapshot and then click Next twice (ensure you choose the same capture profile you selected in step #1 above, if applicable).
  8. Again, do not use the capture machine while the comparison scan is in progress.
  9. When the scan is finished, if you are running PackageAware in the snapshot mode, click the Finish button and save your snapshot. Then, choose Compare two snapshots and click Next. Click the Browse button found next to the Snapshot 1 field, and select the snapshot you saved above in step #5. Click the Browse button found next to the Snapshot 2 field and select the snapshot you saved in the first part of step #10. Then click Next to compare your two selected snapshots. This step does not apply when running PackageAware in direct capture mode.
  10. To create a portable project, check the Create a portable project check-box. This option will copy all required application files into a subfolder of your project folder, replacing all absolute references to files on the capture machine with relative file references to files underneath your project folder. Therefore, when you move this project onto another system - even one that does not have the application to capture already installed - you will be able to rebuild the project successfully. However, since each application file has to be duplicated as part of project creation, this doubles disk space requirements and incurs a performance penalty during the file copy phase. If you are creating portable projects while running PackageAware in the snapshot mode, ensure that you are comparing the snapshots on the system where you obtained the second snapshot as specified in the Snapshot 2 field in step #10 above.
  11. Click Next to generate a ready-to-build InstallAware project from the captured setup. When you press the button, the wizard suggests a project name based on information it has already captured. Save the new project using the suggested name, or enter a custom name. You may save the project in any folder.
  12. If necessary, copy the captured project folder from your capture system onto your production system with InstallAware installed. Open the project in the InstallAware IDE. You are now ready to build an installer out of your captured setup.
  13. If you are running inside a virtualized environment, you may now want to revert to the virtual machine snapshot taken in step 6 above to capture another application.

When you are using the Create a portable project option, PackageAware may occasionally fail to copy files. This is generally a strong indication that some of the files PackageAware detected as a result of the setup capture process are not really a part of the application you were installing, but a part of Windows or another pre-existing application on the system, which changed the files during the capture process, thus misleading PackageAware into associating this updated file with the application you were installing. It is however also possible, especially if you launched the application after its installation, that the application itself is actually using the file and has locked it for access. In this scenario, PackageAware lists the first file name that is causing the issue, and offers you three options:

  • Yes (try again): Clicking this button will attempt to copy the inaccessible file again. You will be prompted again for each file that cannot be copied until the copy succeeds, including the first file that the issue occurs with. Choose this option if the application you are attempting to capture is running, but be sure to entirely shut down the application before clicking the button.
  • No (skip): Clicking this button will discard this file, and any future files that are unable to be copied. You will not be prompted on futher failures, and all failing files will be immediately skipped. Choose this option if the application you are attempting to capture is not running, and you suspect that a Windows component or another unrelated application coincidentally wrote to the file at the same time you were installing the capture application.
  • Cancel (abort): Clicking this button will abandon the entire setup capture process - you will need to re-start from scratch. Choose this option if you are unsure whether to choose Yes or No, and want to try again from the very beginning.

Working with Captured Setups

After you have captured a setup, tune up the generated project.

  • If you do not have InstallAware installed on the capture machine, remember to copy installation files from the capture machine to your development machine. The Create a portable project option in PackageAware helps you avoid manually having to copy files by pre-copying the files for you inside your project folder at project creation time.
  • If you have switched machines after the capture process, the Refactor Paths tool helps you fix up references to directories. For instance, you may use this tool to update folders referring to locations on the capture system to their new locations on your development system.
  • Review the list of captured files, shortcuts, and registry keys to make sure they are pertinent to the setup you captured.
  • PackageAware may occasionally capture files and registry keys that were not actually installed by the setup you were monitoring. Such files may have been changed by other processes and services that were running on the capture machine at the time of the capture, leading PackageAware to believe they were put in place by the setup you were running. If you find references to such unrelated files and registry keys, delete them from your setup project.
  • Build your setup. If you get build errors regarding inaccessible files, make sure no application is using them (such as the application your captured setup may have installed). If you are still getting build errors, remove those inaccessible files from your setup and try again - they are most likely files that were not part of your captured install.
  • Test your setup to make sure it works correctly, and make changes as necessary.
  • You may modify any part of the setup project that is generated by PackageAware to meet your deployment needs.

PackageAware performs intelligent scans and preserves as much of the original setup logic as possible, such as locations of key installation folders, shortcuts, and so on. Typically you will not need to manually edit the generated setup project.

 Notes

  • While you may also use this wizard to capture Windows Installer installations, the recommended way of executing Windows Installer installations as part of your setup is by using the (Un)Install MSI Package command. This command fully preserves the intended setup logic of the original setup author, and InstallAware will even display the native installation progress of the setup.
  • If you already have the sources of the setup project you are trying to import, you may directly convert the setup project into an InstallAware installation using the project converters.
  • If you are importing a Windows Installer setup, the Database Import Wizard tool may be used to directly convert Windows Installer databases into InstallAware setup scripts.
  • A way of easily tailoring a Windows Installer setup without recreating it is by using the InstallAware Transformer, which collects changed properties, directories, and features after completing the installation interview, saving them in an MST Windows Installer transform; which may be consumed by the Application Runtime Wizard, the (Un)Install MSI Package command, Group Policy deployment on Active Directory networks, shortcut files, and so forth.