FeatureAddUninstallCost

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to InstallScript projects.

The FeatureAddUninstallCost function specifies that the feature includes additional uninstallation operations that must be accounted for when updating the progress bar during uninstallation. You do not have to call this function for operations that are included in the uninstallation log file. This includes operations that are handled by the XCopyFile function that may or may not have had to call the FeatureAddCost function to update the progress bar during the installation. This function is only needed for operations that were carried out by functionality other than the InstallScript engine. This function can be called anytime before calling StatusUpdate and can be called multiple times.

Syntax

FeatureAddUninstallCost ( szMediaSource, szFeature, nOps, nOpType);

Parameters

FeatureAddUninstallCost Parameters

Parameter

Description

szMediaSource

The media source, typically MEDIA.

szFeature

Specifies the feature to add this cost to. Note that a specific feature in the media must be specified. Uninstallation cost is calculated by feature. Cost cannot be specified for the entire media.

nOps

The number of operations to be added.

nOpType

Indicates the type of operation. Pass one of the following predefined constants in this parameter:

FEATURE_OPCOST_UNINSTALL_FILE—Specifies the operation as uninstalling a file. You can also specify this constant using the value 4096. This enables you to experiment with different sizes to determine what size to use for your custom operation.
FEATURE_OPCOST_UNINSTALL_REGORINI—Specifies the operation as uninstalling a registry file. You can also specify this constant using the value 2048. This enables you to experiment with different sizes to determine what size to use for your custom operation.
FEATURE_OPCOST_UNINSTALL_UNREGFILE—Specifies the operation as unregistering a file. You can also specify this constant using the value 16384. This enables you to experiment with different sizes to determine what size to use for your custom operation.

Note: You can also pass a numeric value in this parameter to indicate an operation of a specific cost. You may need to experiment with different values to determine the appropriate value for a specified custom operation. Note that the total uninstall cost added is nOps multiplied by nOpType.

Return Values

FeatureAddUninstallCost Return Values

Return Value

Description

ISERR_SUCCESS

Indicates that the function successfully added the cost.

< ISERR_SUCCESS

Indicates that the function was unable to add the cost.

See Also