You cannot declare variable in the [Setup]
section. This section may contain only a set of predefined directives. If your aim was to define a constant which could be used in script section entries as well as in script coding [Code]
section, then you were looking for preprocessor variables declared by #define
directive. For example:
#define MyValue "some value"
[Setup]
AppName={#MyValue}
AppVersion=1.5
DefaultDirName={pf}\My Program
[INI]
Filename: "MyProg.ini"; Section: "InstallSettings"; Key: "InstallPath"; String: "{#MyValue}"
[Code]
function InitializeSetup: Boolean;
begin
Result := True;
MsgBox('{#MyValue}', mbInformation, MB_OK);
end;
What actually happens behind a {#MyValue}
statement is that the preprocessor emits
the value of the defined MyValue
constant to the final script.