As part of the Inno Setup built-in installer, I want to output a text field that the user enters into the installer into a text file.
So far I have the following:
[Code]
var
PrimaryServerPage: TInputQueryWizardPage;
PrimaryAddress: String;
procedure InitializeWizard;
begin
PrimaryServerPage := CreateInputQueryPage(wpWelcome,
'Primary Server Details', 'Where is you application installed?',
'Please specify the IP address or hostname of your Primary Server, ' +
'then click Next.');
PrimaryServerPage.Add('Primary Server IP/Hostname:', false);
PrimaryAddress := PrimaryServerPage.Values[0];
SaveStringToFile('c:\filename.txt', PrimaryAddress, True);
end;
However, when I run the installer and enter the field, it is not output to a text file.
If I replaced PrimaryServerPage.Values[0]with a number, it will be successfully output to a text file.
Can anyone help or suggest suggestions on where I might be wrong?
, , ?
, , . , "ENTER !"
? ?
ApplicationServer=ENTER VALUE HERE!
, ( , ), , , , .
[Code]
var
PrimaryServerPage: TInputQueryWizardPage;
PrimaryAddress: String;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
if(CurPageID = wpWelcome) then
begin
PrimaryServerPage := CreateInputQueryPage(wpWelcome,
'Application Server Details', 'Where is your app installed?',
'Please specify the IP address or hostname of your Application Server, ' +
'then click Next.');
PrimaryServerPage.Add('Primary Server IP/Hostname:', false);
PrimaryAddress := PrimaryServerPage.Values[0];
SaveStringToFile('c:\filename.txt', PrimaryAddress, True);
end;
Result :=True;
end;