VerProductCompareVersions
InstallShield 2022 ยป InstallScript Language Reference
Project:This information applies to InstallScript projects.
The VerProductCompareVersions function compares version information and returns a value indicating the result of the comparison.
Syntax
VerProductCompareVersions ( );
Parameters
None.
Return Values
| Return Value | Description | 
| VERSION_COMPARE_RESULT_NOT_INSTALLED | No version of the product is installed or the installed version was not found (IFX_INSTALLED_VERSION is a null string). | 
| VERSION_COMPARE_RESULT_SAME | The update setup's version is the same as the version currently installed on the target system. | 
| VERSION_COMPARE_RESULT_OLDER | The update setup's version is older than the version currently installed on the target system. | 
| VERSION_COMPARE_RESULT_NEWER_NOT_SUPPORTED | The update setup's version is newer than the version currently installed on the target system, but the currently installed version is not supported by the update setup. | 
| VERSION_COMPARE_RESULT_NEWER | The update setup's version is newer than the version currently installed on the target system, and the currently installed version is supported by the update setup. | 
| < ISERR_SUCCESS | The function failed. | 
Comments
The function compares the values of the system variables IFX_INSTALLED_VERSION and IFX_PRODUCT_VERSION to determine if the version currently installed on the target system is older than the update setup's version; if so, the function compares the values of the system variables IFX_INSTALLED_VERSION and IFX_SUPPORTED_VERSIONS to determine if the update setup applies to the currently installed version.
VerProductCompareVersions is called by the default code for the OnSetUpdateMode and OnUpdateUIBefore event handler functions.