There are a number of built-in support functions which you can use to perform compile-time actions and/or change your script. For example the following uses ISPP function GetVersionNumbersString to read version info from an EXE and uses the return value of the function to set the AppVerName [Setup] section directive using directive emit:
#define MyAppVer GetVersionNumbersString(AddBackslash(SourcePath) + "MyProg.exe")
[Setup]
AppVerName=MyProg version {#MyAppVer}
Built-in support functions can also be called directly from directive emit. For example:
#define MyAppEnterprise
[Setup]
AppName=MyProg{#Defined MyAppEnterprise?" Enterprise Edition":""}
AppVersion={#GetVersionNumbersString(AddBackslash(SourcePath) + "MyProg.exe")}
Function prototypes show the function result type, name, and parameters.
Return and parameter types int, str, any, and void respectively specify the integer type, the string type, any type, and the null type. The integer type is a signed 64-bit integer. When the null type is specified as a function result type then the function does not return a value.
A question mark (?) after an parameter type means that the parameter is optional.