Related to this question: In Inno Setup how to save user inputs to registry?
When doing this:
[Code]
var
UserInputsPage: TInputQueryWizardPage;
function GetUserName(Param: string): string;
begin
Result := UserInputsPage.Values[0];
end;
function GetUserBirthday(Param: string): string;
begin
Result := UserInputsPage.Values[1];
end;
procedure InitializeWizard;
begin
{ Create the page }
UserInputsPage :=
CreateInputQueryPage(wpWelcome,
'User information', 'User name and birthday',
'Please specify the following information, then click Next.');
UserInputsPage.Add('Name:', False);
UserInputsPage.Add('Birthday:', False);
end;
[Registry]
Root: HKCU; Subkey: "Software\My Company\My Program"; \
ValueType: string; ValueName: "UserName"; ValueData: "{code:GetUserName}"
Root: HKCU; Subkey: "Software\My Company\My Program"; \
ValueType: string; ValueName: "UserBirthday"; ValueData: "{code:GetUserBirthday}"
the user input is written to registry.
When I change
CreateInputQueryPage(wpWelcome,
to
CreateInputQueryPage(wpInstalling,
so I have:
var
UserInputsPage: TInputQueryWizardPage;
function GetUserName(Param: string): string;
begin
Result := UserInputsPage.Values[0];
end;
function GetUserBirthday(Param: string): string;
begin
Result := UserInputsPage.Values[1];
end;
procedure InitializeWizard;
begin
{ Create the page }
UserInputsPage :=
CreateInputQueryPage(wpInstalling,
'User information', 'User name and birthday',
'Please specify the following information, then click Next.');
UserInputsPage.Add('Name:', False);
UserInputsPage.Add('Birthday:', False);
end;
[Registry]
Root: HKCU; Subkey: "Software\My Company\My Program"; \
ValueType: string; ValueName: "UserName"; ValueData: "{code:GetUserName}"
Root: HKCU; Subkey: "Software\My Company\My Program"; \
ValueType: string; ValueName: "UserBirthday"; ValueData: "{code:GetUserBirthday}"
user input is not written to registry.
Could someone please tell why?