I\'m creating an installer using InnoSetup, and writing some custom handlers in a [Code]
section. In one of the handlers, I would like to be able to retrieve th
It's a build-time constant, not an install-time value. So you can use the Inno Setup Preprocessor add-on to define such constants. (You can install it easily via the QuickStart pack).
Define the constant:
#define AppName "Excellent Foo App"
Use the constant in [Setup]
:
AppName={#AppName}
And in Pascal code, I'm not totally sure of the syntax, but something like:
MyString := {#AppName}
Update: I realised one of my scripts uses {#emit SetupSetting("AppId")}
which is easier. Brian's solution also discovered this method, and is better.