相关疑难解决方法(0)

Inno Setup:如何将变量从[Code]传递到[Run]

如何在Inno Setup [Code]中将[Run]部分变量传递给参数?

基本上,我想做以下几点.

  1. 获取并保存用户输入到过程中的变量InitializeWizard.
  2. 将用户输入传递给[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 := …
Run Code Online (Sandbox Code Playgroud)

inno-setup

17
推荐指数
1
解决办法
9539
查看次数

标签 统计

inno-setup ×1