Как передать переменную из раздела [Code]
в параметры в разделе [Run]
в Inno Setup?
В принципе, я хочу сделать следующее.
- Получить и сохранить ввод пользователя в переменную в процедуре
InitializeWizard
. - Передайте пользовательский ввод в исполняемый файл в разделе
[Run]
Вот мой код.
[Run]
Filename: "someProgram.exe"; Parameters: ??userInput??
[Code]
procedure InitializeWizard;
var
ConfigPage: TInputQueryWizardPage;
UserInput: String;
begin
{ Create the page }
ConfigPage :=
CreateInputQueryPage(
wpWelcome, 'User input', 'User input',
'Please specify the following information, then click Next.');
{ Add items (False means it not a password edit) }
ConfigPage.Add('Input here:', False);
{ Set initial values (optional) }
ConfigPage.Values[0] := ExpandConstant('hello');
{ Read values into variables }
UserInput := ConfigPage.Values[0];
end;
Спасибо.