FeatureTotalSize

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The FeatureTotalSize function returns the total size—in bytes—of the features referenced by szFeature.

To include subfeatures in the size calculation, set bIncludeSubcomp to TRUE.
To get the total size of all the features in the specified media, set szFeature to a null string ("") and set bIncludeSubcomp to TRUE.

Note: There might be a difference between the value returned by FeatureTotalSize and the space required values displayed in the SdFeatureDialog, SdFeatureDialog2, SdFeatureDialogAdv, and SdFeatureMult dialogs. This difference is due to the fact that this function does not take into account whether any components associated with the feature are currently filtered by operating system or language, or the cluster size on the target drive. To obtain a drive space calculation that takes these factors into account, call FeatureGetCost.

Syntax

FeatureTotalSize ( szFeatureSource, szFeature, bIncludeSubcomp, bTargetSize );

Parameters

FeatureTotalSize Parameters

Parameter

Description

szFeatureSource

Specifies the name of the file media from which the total size of selected features is to be returned.

szFeature

Specifies the name of the feature whose size is to be retrieved. To retrieve the size of the entire media, pass a null string ("") in this parameter.

bIncludeSubcomp

Indicates whether to include selected subfeatures of szFeature. Pass one of the following predefined constants in this parameter:

TRUE—Include selected subfeatures in the size calculation.
FALSE—Do not include subfeatures in the size calculation.

bTargetSize

Indicates whether to retrieve the original, uncompressed size or the size in the media library. Pass one of the following predefined constants in this parameter:

TRUE—Retrieve the original, uncompressed size.
FALSE—Retrieve the size in the media library.

Return Values

FeatureTotalSize Return Values

Return Value

Description

XXXX

The total size, in bytes, of the selected features.

< 0

FeatureTotalSize failed. Call FeatureError for additional information.

See Also