I want to know, if there is a way to add some command line parameters to Inno Setup based installer for /VERYSILENT
mode, if for example I have theses checks:
Source: "{app}\Portable-File.exe"; DestDir: "{app}"; MinVersion: 0.0,5.0; Check: install1;
Source: "{app}\Installer-File.exe"; DestDir: "{app}"; MinVersion: 0.0,5.0; Check: porta1;
And I have these lines based in my two examples checks:
"MyProgram.exe" /VERYSILENT /install1 /EN
"MyProgram.exe" /VERYSILENT /porta1 /EN
Implement the
install1
andporta1
functions like:You can actually use the
HasCommandLineSwitch
directly in theCheck
parameter:Though I assume that your
install1
andporta1
function will actually do more than just callHasCommandLineSwitch
, so this is probably not applicable to you.Actually, as I know that you have checkboxes that correspond to
install1
andporta1
, what you really want to do, is to check those checkboxes, when the installer is starting, if the switches are specified. This way you can use/install1
and/porta1
to set default values, even if not used in combination with/verysilent
. And it will still work even in the/verysilent
more, even though the user will actually never see the checkboxes (they are still present, even though not visible)And you keep your
install1
andporta1
function to return the state of the checkboxes, as seen in Inno Setup Set Uninstallable directive based on custom checkbox value.