Files and Folders View

InstallShield 2013

Project: The Files and Folders view is available in the following project types:

Basic MSI
DIM
InstallScript
InstallScript MSI
InstallScript Object
Merge Module
MSI Database
MSM Database
Transform

The main purpose of most installations is to transfer files from the source medium to the target destination. With InstallShield, adding files to your project is a simple drag-and-drop process.

Note: The Files and Folders view from within Microsoft Visual Studio differs from the Files and Folders view in InstallShield. For more information, refer to Adding References to Visual Studio Solutions.

Adding Files

You can add files to your project in one of three different ways. Each of these methods is described below:

Dragging and Dropping Files

You can add files to your project using the Files explorer in the Files and Folders view. The top two panes in this view are functionally equivalent to Windows Explorer. The bottom two panes represent the destination for your files.

You can drag source files from the top pane to the destination folder in the bottom pane. InstallShield also provides a context menu with additional drag and drop options that allow you to drag folder only and to preserve the source structure.

Dynamic File Linking

The second way to add files to your project is by linking to the contents of an entire folder, or to specific files in the folder. This method allows you to point to a specific folder, either locally or on a network, that contains files for your installation. Every time you build your installation, the contents of the folder are added to your feature.

Additionally, you can use wildcards to filter which files are added to your project. For more information, see Creating a Dynamic Link.

Note: To improve performance, the list displayed in the Files and Folders view truncates when there are more than a predefined number of files in a dynamically linked file with subfolders. **List Truncated** appears as the first item in the file list when this occurs. All files contained in the subfolders are built into your setup project.

Dependency Scanning

The final way to add files to your project is accomplished through the Dependency Scanners view. This view contains three wizards that can scan your project, a running application, or a Visual Basic project for possible dependency files and add them to your project. All three of these wizards can also be launched from the Project menu.

Working with Key Files

A key file is a file that the Windows Installer uses to detect the component’s presence. Each component can have a key file. The key file is differentiated from non-key files by the key icon. You can set a key file in either the Components view or Setup Design view. To navigate to one of these views, right-click a component in the Destination pane of the Files and Folders view and click Go to Advanced Components view.

Extracting and Refreshing COM Data for Key Files

The Files and Folders view also offers the option to extract and refresh COM data for key files. These options are available from the context menu when you select a file.

Note: The Extract COM Data for Key File and Refresh COM Data for Key File options are enabled only if the file is a self-registering .dll, .ocx, or .exe file, and if the file is the component’s key file.

Creating Folders on the Target System

To create a new folder:

1. Right-click a folder in the Destination computer’s folders pane and click New Folder.
2. Type a name for the folder.

Note: To change the folder’s location in the Destination computer’s folders tree structure, drag and drop the folder to a different location.

Following Setup Best Practices

When you add files to your setup in this view, components are created according to Setup Best Practices. For example, all portable executable files (.exe, .dll, .ocx files) are given their own component. All other files are added to the default component for each destination directory. However, if you drag files directly to one of the components listed under a destination folder, the Setup Best Practices rules are ignored.

Automatically Creating New Components When You Add Files

New components can be created for you to properly handle the files as you add them to your setup project. To accommodate this, select the feature (or, in InstallScript projects, the component) with which you want to associate any newly created components. To set the feature, select it from the list box at the top of the Files and Folders view.

Note: This list box is only for selecting the feature (or component) with which new components will be associated. It is not used to associate files directly with a specific feature.

If no features exist, you have the option of creating one when you first add files in this view.

Changing the Component/Feature Relationship

You can change the component/feature relationship by right-clicking a component and then clicking Properties. Then, use the Features tab to make the necessary changes.

Note: To display components in the Files and Folders view, right-click a destination folder (in the lower-left pane of the view) and click Show Components.

See Also