Rohan
Rohan

Reputation: 11

Inno Setup - Retrieve custom values

I have created a custom page in inno setup. It has 5 textboxes each for a specific purpose. I want to retrieve the values (as entered by the user) in the script for doing additional work, such as registering, creation of folders, etc... Can anyone please suggest on how to retrieve the values in the script for the custom page and controls?

Upvotes: 1

Views: 2152

Answers (1)

Andreas Rejbrand
Andreas Rejbrand

Reputation: 109002

You should have a look at the sample script CodeDlg.iss that is intalled with Inno Setup. I suppose that you use the CreateInputQueryPage function to create your custom page with the five text boxes, as in CodeDlg.iss:

UserPage := CreateInputQueryPage(wpWelcome,
  'Personal Information', 'Who are you?',
  'Please specify your name and the company for whom you work, then click Next.');
UserPage.Add('Name:', False);
UserPage.Add('Company:', False);

Then you use

UserPage.Values[0]

to access the value of the first edit box, UserPage.Values[1] to access the data of the second, and so on.

Upvotes: 4

Related Questions