[Setup] AppName=My Application AppVersion=1.5 DefaultDirName={pf}\My Application [Code] var AkkPage: TWizardPage; LPEdit: array[0..1]of TNewEdit; procedure InitializeWizard(); var i : Integer; begin AkkPage := CreateCustomPage(wpWelcome, 'Учетная запись', 'Введите данные учетной записи, если имеется.'); for i := 0 to 1 do begin with TLabel.Create(WizardForm) do begin Parent := AkkPage.Surface; Alignment := taCenter; AutoSize := False; case i of 0 : Caption := 'Введите свой ник'; 1 : Caption := 'Введите пароль'; end; SetBounds(ScaleX(30), ScaleY(56+i*80), ScaleX(357), ScaleY(13)); end; LPEdit[i] := TNewEdit.Create(WizardForm); with LPEdit[i] do begin Parent := AkkPage.Surface; SetBounds(ScaleX(30), ScaleY(72+i*80), ScaleX(357), ScaleY(21)); end; end; end; procedure CurStepChanged(CurStep: TSetupStep); begin if CurStep = ssPostInstall then if ((LPEdit[0].Text <> '') and (LPEdit[1].Text <> '')) then SaveStringToFile({ не забудь указать путь и имя файла},LPEdit[0].Text + #13#10 + LPEdit[1].Text, False); { #13#10 - перенос строки} end; |