Is it possible to accept custom command line parameters with Inno Setup

With InnoSetup 5.5.5 (and perhaps other versions), just pass whatever you want as a parameter, prefixed by a /

c:\> myAppInstaller.exe /foo=wiggle

and in your myApp.iss:

[Setup]
AppName = {param:foo|waggle}

The |waggle provides a default value if no parameter matches. Inno setup is not case sensitive. This is a particularly nice way to handle command line options: They just spring into existence. I wish there was as slick a way to let users know what command line parameters the installer cares about.

BTW, this makes both @knguyen’s and @steve-dunn’s answers somewhat redundant. The utility functions do exactly what the built-in {param: } syntax does.

Leave a Comment