Add File to ISWI Component

Project File:

Component Name:
File Name:


Instructions

  1. Enter the full path of an ISWI .ism project file.
  2. Click the "Open" button. Once the project has been opened, the "Cancel", "Save and Close", and "Add File" buttons will be enabled.
  3. Enter the name of the component and the name of the file using path variable syntax (see below).
  4. Click the "Add File" button to add the file to the component.
  5. Repeat steps 3 and 4 to add as many files to as many components as necessary.
  6. When you are finished adding files to components, click the "Save and Close" button to save your changes to the ISWI project. To discard any changes click the "Cancel" button.

Background

This utility provides a workaround for a problem in the InstallShield for Windows Installer GUI. If the existing path variables in a project contain relative directory paths (foo\..\..\bar), then it is impossible to add a file to an existing component through the GUI and reuse the existing path variable. The GUI forces you to create a new path variable that points to the same location. Having multiple path variables for the same location is error-prone.

The alternative is to delete the component and re-create it with the "Component Wizard" adding the new file to the component as well as all of the files previously contained within that component. However, this is also error-prone because the wizard does not restore all additional changes to the component that were made before the new file was to be added. This means that additional registry settings, COM registration information changes, service control parameters and so-on that are attached to the component are lost when the component is deleted and they are not restored through the wizard. This means a large amount of rework on the component when the only required change is adding a file. The rework is error-prone and tedious, leading to additional testing and additional bugs in the install.

This tool avoids the problems of the GUI by using the automation interface to ISWI to add the file to a component using the existing path variable name. Path variables are not exposed directly through the automation interface, but can be used by giving the filename to be added in the form "<pathvar>\file", where pathvar is the name of an existing path variable in the project. The <>'s are the ISWI syntax for denoting a path variable within a filename.

IE Security Warnings

Because this tool uses the automation interface of ISWI, you must have ISWI installed on your machine in order for this tool to function. Because an object is created on the loading of this page, IE will prompt you for execution of possibly unsafe ActiveX controls on this page. Click "Yes" to allow the script to run.