Removing Files and Folders from Target Systems

InstallShield 2014

Project: This information applies to the following project types:

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

InstallShield has built-in support that makes it easy to specify files and folders that you want to be removed from target systems at run time. This file and folder removal capability is useful for scenarios such as removing application-created files that your installation does not otherwise track.

You can schedule the removal of a file or folder for one of the following events:

When the file or folder’s component is being installed
When the file or folder’s component is being uninstalled
When the file or folder’s component is being installed or uninstalled

Note that if the item to be removed is a folder, that folder is removed only if it is empty.

InstallShield offers different methods for configuring a file or folder removal in a project.

Using the Files and Folders View to Specify Files and Folders to Be Removed

To configure file and folder removals through the Files and Folders view:

1. In the View list under Application Data, click Files and Folders.
2. In the Destination computer’s folders pane, select the destination folder that contains the file or folder that you want to be removed.
3. Right-click in the Destination computer’s files pane and click Add File Removal. The Properties dialog box opens.
4. Configure the settings as needed. For details, see File Removal Properties Dialog Box.

InstallShield adds a file or folder icon to the Destination computer’s files pane. The icon has a red X through it to indicate that it is referencing an item to be removed.

Using the Setup Design View or Components View to Specify Files and Folders to Be Removed

To configure file and folder removals through the Setup Design view or the Components view:

1. In the View list under Organization, click Setup Design (in installation projects) or Components.
2. In the Setup Design or Components tree, expand the node of the component that contains the file or folder that you want to be removed, and then click the Files subnode.
3. Right-click in the Files pane and click Add File Removal. The Properties dialog box opens.
4. Configure the settings as needed. For details, see File Removal Properties Dialog Box.

InstallShield adds a file or folder icon to the Files pane. The icon has a red X through it to indicate that it is referencing an item to be removed.

Editing File or Folder Removal Settings

To change the settings for a file or folder removal, right-click the removal item and then click Properties. The Properties dialog box opens, enabling you to edit the settings as needed.

See Also