Inno Setup でセクションから[Code]
セクションのパラメータに変数を渡すにはどうすればよいですか?[Run]
基本的に、私は次のことをしたいです。
- ユーザー入力を取得して、プロシージャ内の変数に保存します
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's 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;
ありがとう。