I want to know how to use the Uninstallable directive when I have no tasks or components:
[Setup] Uninstallable:not if IscomponentSelected ('comp1 comp2')
I have no tasks or components. I created several checkboxes with a โportableโ option, which I want to add the uninstallable option when this checkbox is selected:
[Code] var Component: TWizardPage; portable,installer: TNewRadioButton; Copmp: TLabel; function install: Boolean; begin Result := installer.Checked; end; function portab: Boolean; begin Result := portable.Checked; end; procedure InitializeWizard(); begin Component := CreateCustomPage( wpSelectDir, 'Component Selection', 'Which types and components would you like to install?'); CompPanel := TPanel.Create(WizardForm); with CompPanel do begin Parent := Component.Surface; Left := ScaleX(0); Top := ScaleY(0); Width := ScaleX(417); Height := ScaleY(100); BevelOuter := bvNone; end; Copmp := TLabel.Create(WizardForm); with Copmp do begin Parent := CompPanel; Caption := 'Type and components:'; Left := ScaleX(0); Top := ScaleY(5); Width := ScaleX(150); Height := ScaleY(13); end; portable := TNewRadioButton.Create(WizardForm); with portable do begin Parent := CompPanel; Left := ScaleX(5); Top := ScaleY(25); Width := ScaleX(200); Height := ScaleY(17); Caption := 'Unpacking'; OnClick: =@CopmpClick ; end; installer := TNewRadioButton.Create(WizardForm); with installer do begin Parent := CompPanel; Left := ScaleX(5); Top := ScaleY(45); Width := ScaleX(200); Height := ScaleY(17); Caption := 'Install'; OnClick: =@CopmpClick ; Checked:=True; end;
source share