You can use the "add custom page" to enrich the features of the installer. This article takes "Select installation type" as an example to add a page. Selecting Standard installation skips the "select target location" and "Select Start Menu folder" pages.
Add the following Code in the [Code] section:
VarPage: TWizardPage; rack, RadioButton2: TRadioButton; Lbl1, Lbl2: TNewStaticText; procedure CreateAddonPage; beginPage: = CreateCustomPage ', 'select the installation type as needed '); RadioButton1: = TRadioButton. create (Page); RadioButton1.Left: = ScaleX (80); RadioButton1.Top: = ScaleY (40); RadioButton1.Width: = Page. surfaceWidth; RadioButton1.Height: = ScaleY (17); RadioButton1.Caption: = 'standard installation'; RadioButton1.Checked: = True; RadioButton1.Parent: = Page. surface; Lbl1: = TNewStaticText. create (Page); Lbl1.Left: = ScaleX (95); Lbl1.Top: = ScaleY (60); Lbl1.Width: = ScaleX (250); Lbl1.Height: = ScaleY (50); Lbl1.Caption: = 'Install software to your computer in standard mode'; Lbl1.Parent: = Page. surface; RadioButton2: = TRadioButton. create (Page); RadioButton2.Left: = ScaleX (80); RadioButton2.Top: = RadioButton1.Top + ScaleY (60); RadioButton2.Width: = Page. surfaceWidth; RadioButton2.Height: = ScaleY (17); RadioButton2.Caption: = 'custom installation'; RadioButton2.Checked: = false; RadioButton2.Parent: = Page. surface; Lbl2: = TNewStaticText. create (Page); Lbl2.Left: = ScaleX (95); Lbl2.Top: = Lbl1.Top + ScaleY (60); Lbl2.Width: = ScaleX (250); Lbl2.Height: = ScaleY (50 ); lbl2.Caption: = 'You can select a single installation item. It is recommended that you use it with rich experience'; Lbl2.Parent: = Page. surface; end; procedure InitializeWizard (); beginCreateAddonPage; end; function ShouldSkipPage (PageID: Integer): Boolean; beginif (PageID = wpSelectDir) and (RadioButton1.Checked) thenResult: = Trueelse if (PageID = wpSelectProgramGroup) and (RadioButton1.Checked) thenResult: = Trueend;
In the code, the red part indicates the CurPageID value of the Wizard Page followed by the custom page, and the blue part indicates the title and description of the custom page, respectively.
Default Value:
Custom:
From: http://hi.baidu.com/watashi/item/b3dda993459ff8f0291647a0