StatusUpdate

InstallShield 2018 » InstallScript Language Reference

The StatusUpdate function enables or disables the link between file transfer operations and the progress indicator of the status bar. When bLink is ON, the link is enabled and nFinalPercent specifies a final percentage to be displayed at the end of the next file transfer. During that file transfer, the status bar is updated smoothly from its current value to the value specified by nFinalPercent. When bLink is OFF, the link is disabled and the progress indicator of the status bar is not updated automatically during subsequent file transfers.

This function works by computing the total number of bytes to be transferred by any of the file transfer functions. It then computes how often it will increment the progress bar starting from its current location to the maximum value in nFinalPercent.

The StatusUpdate function does not work with the functions VerUpdateFile and VerSearchAndUpdateFile. When calling those functions, you should disable the status bar or update it manually.

To set the status bar to an initial percentage, call SetStatusWindow before calling StatusUpdate.

Tip • If the status bar is enabled during file transfer, call StatusUpdate before each call to CopyFile or XCopyFile). Before calling FeatureMoveData to transfer files, call StatusUpdate with the parameters ON and 100. This sets the status bar to update smoothly to 100% during the file transfer stage of the setup.

Syntax

StatusUpdate ( bLink, nFinalPercent );

Parameters

StatusUpdate Parameters

Parameter

Description

bLink

Specifies whether to enable or disable the link between file transfer operations and the progress indicator of the status bar. Pass one of the following predefined constants in this parameter:

ON—Specifies that the progress indicator of the status bar should be linked to file transfer operations.
OFF—Specifies that link between file transfer operations and the progress indicator of the status bar should be disabled. The link remains disabled until it is reestablished by a subsequent call to StatusUpdate with bLink set to ON.

Note • The status bar can be updated manually by calling SetStatusWindow.

nFinalPercent

Specifies the final percentage value that the progress indicator of the status bar should reach at the end of the next file transfer operation if bLink is ON. If the value passed in nFinalPercent is less than the current value in the progress indicator of the status bar, the progress indicator will not change. When bLink is OFF, this parameter is ignored.

Return Values

StatusUpdate Return Values

Return Value

Description

0

Indicates that the function was successful.

< 0

Indicates that the function was not successful.

See Also