Yes, you can build the setup passing values to the preprocessed script. There is the /d
command line parameter of the command line preprocessor compiler
. See e.g. this very simple script:
[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
AppPublisher={#Publisher}
AppPublisherURL={#PublisherWeb}
This script you can build with the ISCC.exe
command line tool passing the values to the expected variables e.g. this way:
iscc "/dPublisher=My Company" "/dPublisherWeb=www.example.com" "c:\Script.iss"
That will preprocess the script passing the values and build the output setup binary. If you'd like also to save the preprocessed scripts somewhere, you can put a line like this to the very end of your script:
#expr SaveToFile("c:\PreprocessedScript.iss")
That will store the script with the values filled by preprocessor.