4

How I can get the version number from a exe file or a dll using Inno, I tried the GetFileVersion function but only is available in the Inno Preprocessor (and I need use this function in the [Code] section of my script) . Also I tried the GetFileVersionInfo function but is not recognized by Inno.

1
  • 1
    Essentially no WinAPI function declarations are available in Inno Setup's Pascal script, but you are always free to call any function in any DLL by declaring it yourself. For instance, GetFileVersionInfo resides in version.dll. Commented Jun 27, 2011 at 22:16

1 Answer 1

11

Try

function GetVersionNumbers(const Filename: String; var VersionMS, VersionLS: Cardinal): Boolean;

and/or

function GetVersionNumbersString(const Filename: String; var Version: String): Boolean;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.