Archive: How to get an EXE version?


How to get an EXE version?
I want to add version info from NSIS script,how to get an executable file version?


NSIS manual E.1.8 GetFileVersion:

Get version information from executable file.
Syntax:

${GetFileVersion} "[Executable]" $var
"[Executable]" ; Executable file (*.exe *.dll ...)
$var ; Result: Version number
Note:
- Error flag if file doesn't exist
- Error flag if file doesn't contain version information

Example:

Section
${GetFileVersion} "C:\ftp\program.exe" $R0
; $R0="1.1.0.12"
SectionEnd
CF

If you wish to put the version from that executable into your NSIS installer, you need to create another installer which does it for you.

This page does exactly that:
http://nsis.sourceforge.net/Invoking...n_compile-time

-Stu


Thanks very much.