Is it possible to obtain the Inno Setup version number for use in an Inno Setup installer?
I cannot find a documented switch to return its version number (e.g. 5.5.6) and there doesn't seem to be an exposed predefined version constant exposed to Inno Setup scripts.
On the contrary @magicnumber, there is indeed a compiler version constant available directly in your inno-script. The predefined Preprocessor variable Ver returns the 32-bit encoded version of Inno Setup compiler. Highest byte holds the major version, lowest byte usually holds zero. Make it prettyful with the DecodeVer function. Example:
#define MyCompilerVerStr DecodeVer(Ver)
Update:
You can also add details if the compiler is the unicode or non-unicode version:
#ifdef UNICODE
  #define MyInnoVersion DecodeVer(Ver) + " (unicode)"
#else
  #define MyInnoVersion DecodeVer(Ver) + " (non-unicode)"
#endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With