InstallShield 2016 » InstallScript Language Reference
The VerGetFileVersion function retrieves the numeric version information of the specified file.
Note • Although InstallScript's file version functions take version information in string format, the version information they reference in a file is the numeric version information. A file's string version information is not inspected or returned by InstallScript functions. Further, when Windows Explorer displays a file's properties, it shows the string version information, which might not be equivalent to the file's numeric version information. For that reason, the value returned in svVersionNumber by VerGetFileVersion might not match the version information displayed by Windows Explorer.
For more about file version information, consult the Windows documentation.
Syntax
VerGetFileVersion ( szFileName, svVersionNumber );
Parameters
Parameter |
Description |
szFileName |
Specifies the fully qualified name of the file whose numeric version information is to be retrieved. |
svVersionNumber |
Returns the numeric version information as a string in the following format: <major version>.<minor version> For example, if svVersionNumber returns 2.1.2.0, the major version number is 2.1 and the minor version number is 2.0. |
Return Values
Return Value |
Description |
0 |
Indicates that the function successfully returned the version information. |
FILE_NOT_FOUND (-2) |
Indicates that the specified file was not found. |
FILE_NO_VERSION (-8) |
Indicates that the file was found but did not contain version information. |
See Also
InstallShield 2016 Help LibraryMay 2017 |
Copyright Information | Flexera Software |