Inno Setup Preprocessor: GetFileVersion

Inno Setup Preprocessor

Inno Setup Preprocessor: GetFileVersion

Prototype

str GetFileVersion(str)

Description

GetFileVersion function takes a string argument which must be set to the name of the file whose version information is to be queried. The function returns string composed of four decimal numbers delimitted with periods. If file does not contain valid version info, the function returns an empty string.

ISPP also has GetStringFileInfo function, which also can be used to retrieve file version (using "FileVersion" or "ProductVersion" as second parameter). The difference is that GetFileVersion takes it from fixed block of version info, unlike GetStringFileInfo, which extracts string from language specific block.