GetAndAddAllFilesCost

InstallShield 2019 » InstallScript Language Reference

The GetAndAddAllFilesCost function determines the cost of all of the files that are in szSrcDir and that match the wild-card pattern that is identified by szWildcard; the function adds this cost to the current value of nvCostHigh and/or nvCostLow. This cost can then be passed to FeatureAddCost.

Note • Note that GetAndAddAllFilesCost does not actually set any information to be used directly by the installation. You must call FeatureAddCost (as appropriate) after calling this function to add the additional cost to an existing feature.

Syntax

GetAndAddAllFilesCost (szSrcDir, szWildcard, szTargetDir, nClusterSize, nvInstallCostHigh, nvInstallCostLow, nvUninstallCost);

Parameters

GetAndAddAllFilesCost Parameters

Parameter

Description

szSrcDir

The fully qualified path of the source location containing the files to determine the cost of.

szWildcard

The wild card to match files against. Note that the function returns failure if no files that match szWildcard are found.

szTargetDir

If nClusterSize is 0, the fully qualified path that the file is being installed to. This path is used to determine the cluster size of the target drive. If nClusterSize is non-zero, this parameter is ignored.

nClusterSize

Specifies the cluster size of the target drive. If this parameter is 0, the function determines this information from szTargetDir.

nvInstallCostHigh

The upper 31 bits of the install cost (in bytes) of this file is added to the current value of this variable.

nvInstallCostLow

The lower 31 bits of the install cost (in bytes) of this file is added to the current value of this variable.

nvUninstallCost

The uninstall cost of these files is added to the current value of this variable. This value equals 1 per file to be uninstalled. Therefore, 100 files to be uninstalled returns a value of 100.

Return Values

GetAndAddAllFilesCost Return Values

Return Value

Description

ISERR_SUCCESS

Indicates that the function was successful.

< ISERR_SUCCESS

Indicates that the function was not successful.

See Also