How do you pass in parameters to the Inno Setup command line compiler?

AlanKley picture AlanKley · Feb 4, 2009 · Viewed 20.6k times · Source

It was suggested in the IS newsgroup to use /D= but using the iscc.exe that came with version 5.2.3 I get an "Unknown option:" error.

Then in the script, how do you use the value of the command line parameter?

Answer

Jon Bright picture Jon Bright · Feb 4, 2009

You do, as MicSim says, need the preprocessor. It's included in the latest ISPack. Once it's installed, iscc supports /D.

You can then use the values defined like this (assuming you'd done /DVERSION_NAME=1.23):

AppVerName=MyApplication v{#VERSION_NAME}