I\'m building my setup with server and client installation/setup types. I need to skip or hide a custom page if user choose server type. Server type only have a custom page
In ShouldSkipPage
event function, compare the PageID
against the TWizardPage.ID of the custom page. And use WizardSetupType support function to test the selected setup type.
var
Page: TWizardPage;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
Result := False;
if Page.ID = PageID then
Result := (WizardSetupType(False) <> 'server');
end;
And obviously, your custom page must show after the "Select Components" page, not before:
Page := CreateCustomPage(wpSelectComponents, ...);
Alternatively, you can handle TWizardPage.OnShouldSkipPage of the custom page.