InstallShield 2016 » InstallScript Language Reference
Project • This function applies to InstallScript projects.
The FeatureSpendUninstallCost function is used to tell the setup that the progress bar should be updated for a certain amount of uninstall ‘cost’ that has been spent by an event external to the setup. This function has the effect of updating the progress bar appropriately as if the setup itself had spent the corresponding amount of cost. This function can only be called during a standard file operation event, such as an event resulting from calling FeatureTransferData or FeatureMoveData. Typically, this function is called during the OnInstalling or OnInstalled event as a result of an external event occurring that spends cost.
Note • It is not necessary to call this function for file transfer operations that are listed the uninstall log file., such as XCopyFile or CopyFile operations. The status bar is updated automatically for items listed in the log file, note also that you do not need to call FeatureAddUninstallCost for items listed in the log file, as the setup automatically accounts for all items listed in the log file. However, FeatureAddCost must be called in this case so the file transfer operation is aware of the additional cost.
Syntax
FeatureSpendUninstallCost ( nOps, nOpType);
Parameters
Parameter |
Description |
|||||||||
nOps |
The number of operations to spend. |
|||||||||
nOpType |
Indicates the type of operation. Pass one of the following predefined constants in this parameter:
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
Return Value |
Description |
ISERR_SUCCESS |
Indicates that the function successfully updated the progress bar. |
< ISERR_SUCCESS |
Indicates that the function was unable to update the progress bar. |
See Also
Embedding Custom Transfer File Operations
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |