Inno Setup Preprocessor: GetFileVersion

Prototype

str GetFileVersion(str)

Description

Takes a string argument which must be set to the name of the file whose version information is to be queried. Returns a string composed of four decimal numbers delimited with periods. Returns an empty string if the file does not contain valid version info.

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 the fixed block of version info, unlike GetStringFileInfo, which extracts string from the language specific block.