FeatureTransferData

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI—if the InstallScript user interface (UI) style is the traditional style (which uses the InstallScript engine as an external UI handler)

This information does not apply to InstallScript MSI projects in which the InstallScript UI style is the new style (which uses the InstallScript engine as an embedded UI handler). To learn more, see Using the InstallScript Engine as an External vs. Embedded UI Handler for InstallScript MSI Installations.

If you use an event-based script, the FeatureTransferData function is called automatically after the OnFirstUIBefore event and interacts with the OnMoving, OnMoved, and feature events. FeatureTransferData installs or uninstalls features appropriately based on their selection state and whether they are currently installed.

FeatureTransferData does the following:

Installs features that are selected (for example, by end user selections in feature or setup type dialogs) and are currently not installed.
Uninstalls features that are not selected and are currently installed. The installation determines whether a feature is currently installed by reading the existing log file during installation initialization. If no valid log file is found during installation initialization, all features are considered to be not installed.

The installation determines whether a feature is currently installed by reading the existing log file during installation initialization. If no valid log file is found during installation initialization, all features are considered to be not installed.

When you call FeatureTransferData, Do (SELFREGISTRATIONPROCESS) is called automatically after the files are installed but before the call returns. Therefore, if your installation needs to perform additional actions after the file transfer but before self-registration, place these actions in the OnMoved event; the OnMoved event is called after the file transfer but before the batch self-registration occurs.

Syntax

FeatureTransferData ( szFeatureSource );

Parameters

FeatureTransferData Parameters

Parameter

Description

szFeatureSource

Specifies the media name of the file media whose features have been specified for installation and uninstallation. Typically, you would pass the system variable MEDIA in this parameter.

Return Values

FeatureTransferData Return Values

Return Value

Description

0

Indicates that the function successfully performed the feature installations and uninstallations.

< 0

Indicates that the function could not perform the feature installations and uninstallations.

Additional Information

You can call one of the following functions before calling FeatureTransferData to affect the result of the call:

FeatureReinstall—Reinstalls all features that are currently selected when FeatureTransferData is called.
FeatureRemoveAll—Removes (uninstalls) all features when FeatureTransferData is called.

See Also