14
Làm cách nào để chuyển biến từ mục [Code]
đến tham số trong mục [Run]
trong Thiết lập Inno?Cài đặt Inno: Cách chuyển biến từ [Mã] sang [Chạy]
Về cơ bản, tôi muốn làm như sau.
- Nhận và lưu đầu vào của người dùng vào biến trong quy trình
InitializeWizard
. - Vượt qua đầu vào người sử dụng khả năng thực hiện trong
[Run]
phần
Đây là mã của tôi.
[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;
Cảm ơn.
TLama, đó chính xác là những gì tôi cần. Nó đã làm việc. Cảm ơn nhiều. – wcc