I am preparing an installer with Inno Setup. But I'd like to add an additional custom (none of the available parameters) command line parameters and would like to get the value of the parameter, like:
setup.exe /do something
Check if /do
is given, then get the value of something. Is it possible? How can I do this?
To prevent this behavior, you can suppress the log file by specifying /LogFile= (with no filename argument) after Installutil.exe on the command line.
The installer has the ability to compare file version info, replace in-use files, use shared file counting, register DLL/OCX's and type libraries, and install fonts. Creation of shortcuts anywhere, including in the Start Menu and on the desktop. Creation of registry and . INI entries.
/SUPPRESSMSGBOXESInstructs Setup to suppress message boxes. Only has an effect when combined with '/SILENT' or '/VERYSILENT'. The default response in situations where there's a choice is: Yes in a 'Keep newer file? ' situation.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With