FeatureCompareSizeRequired

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The FeatureCompareSizeRequired function determines whether the target folder contains enough free space for the selected features specified by szFeatureSource, which must be a file media. If the target folder does not have sufficient free space, the fully qualified folder name is returned in svTarget and the amount of required free space is returned in nvSize.

If your setup specifies a destination folder for a feature in a file library at run time, it must do so by calling FeatureSetTarget before checking for free space with FeatureCompareSizeRequired.

Note: This function cannot be used with script-created feature sets.

Syntax

FeatureCompareSizeRequired ( szFeatureSource, svTarget, nvSize );

Parameters

FeatureCompareSizeRequired Parameters

Parameter

Description

szFeatureSource

You must pass the system variable MEDIA in this parameter. No other value is valid.

svTarget

Returns a null string ("") if there is sufficient free space available on the target drive. Returns the target path if there is not sufficient free space on the target drive.

Note: The parameter svTarget is used only to return a folder name. You cannot use the parameter to specify a destination folder. FeatureCompareSizeRequired checks the drive that is indicated by the destination folder that you specified for each component in the Components view. If szFeatureSource is a file media with features to be installed in the General Application Destination, you must assign a destination path to TARGETDIR (in InstallScript installations) or INSTALLDIR (in InstallScript MSI installations) before calling FeatureCompareSizeRequired. You can obtain a destination path from an end user by calling AskDestPath or a feature dialog.

nvSize

Returns 0 if there is sufficient free space available on the target drive. Returns the size (in bytes) required if there is not sufficient free space on the target drive.

Return Values

FeatureCompareSizeRequired Return Values

Return Value

Description

0

FeatureCompareSizeRequired was successful.

< 0

FeatureCompareSizeRequired failed. Call FeatureError for additional information.

See Also