Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: None  |  size: 0.55 KB  |  hits: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Inno Setup: Disable postinstall checkbox with CLI flags
  2. [Run]
  3. Filename: {app}App.exe; Description: {cm:LaunchProgram,App}; Flags: nowait postinstall; Check: NoRunSwitch
  4.  
  5.  
  6. [Code]
  7. function NoRunSwitch: boolean;
  8. var
  9.   i: integer;
  10. begin
  11.   // Return TRUE to show the checkbox on the final page, return FALSE to hide it.
  12.   Result := True; // In case there are no parameters
  13.   for i := 1 to ParamCount do
  14.   begin
  15.     // Tweak the switch parsing to suit your needs here
  16.     Result := not (UpperCase(ParamStr(i)) = '/NORUN');
  17.     if not Result then break;
  18.   end;
  19. end;