
Untitled
By: a guest on
May 2nd, 2012 | syntax:
None | size: 0.55 KB | hits: 36 | expires: Never
Inno Setup: Disable postinstall checkbox with CLI flags
[Run]
Filename: {app}App.exe; Description: {cm:LaunchProgram,App}; Flags: nowait postinstall; Check: NoRunSwitch
[Code]
function NoRunSwitch: boolean;
var
i: integer;
begin
// Return TRUE to show the checkbox on the final page, return FALSE to hide it.
Result := True; // In case there are no parameters
for i := 1 to ParamCount do
begin
// Tweak the switch parsing to suit your needs here
Result := not (UpperCase(ParamStr(i)) = '/NORUN');
if not Result then break;
end;
end;