Pascal Scripting: Using Custom Wizard Pages

The Pascal script allows you to add custom pages to Setup's wizard. This includes "pre-built" wizard pages for common queries and completely custom wizard pages with the controls of your choice.

To use custom wizard pages, first create them inside your InitializeWizard event function. You can either use pre-built pages created by the CreateInput...Page and CreateOutput...Page functions or "empty" pages created by the CreateCustomPage function. See Support Functions topic for a listing and explanation of all Create...Page functions.

After creating each page, you add controls to it, either by calling the special methods of the pre-built pages, or by manually creating controls on the page yourself.

Most of the Create...Page functions take a "page ID" as their first parameter; this identifies the existing page after which the newly created page should be placed. There are several ways to find the "page ID" of an existing page. The pages you create yourself have ID properties which hold their page IDs. Built-in wizard pages have predefined IDs. For example, for the Welcome wizard page this is wpWelcome. See the Support Functions topic for a listing of all predefined IDs.

After the custom wizard pages are created, Setup will show and handle them just as if they were built-in wizard pages. This includes the calling of all page related event functions such as NextButtonClick and ShouldSkipPage.

At any time during Setup you can retrieve the values entered by the user either by using the special properties of the pre-built pages, or by using the properties of the controls you created yourself.

Open the "CodeDlg.iss" script in the "Examples" subdirectory of your Inno Setup directory for an example of how to use pre-built custom wizard pages and event functions. Open the "CodeClasses.iss" script for an example of how to use completely custom wizard pages and controls.