InnoSetup中的文件选择

Mik*_*ley 3 installer pascal inno-setup

我希望用户在安装过程中选择许可文件,如何创建这种对话框?有谁能展示一些示例代码?

Ken*_*ite 5

Inno Setup文档中有一个代码示例(请参阅"Pascal脚本","支持函数参考","对话框函数" - 您可以从这里开始):

var
  FileName: string;
begin
  // Set the initial filename
  FileName := '';
  if GetOpenFileName('', FileName, '', 
     'Text Documents (*.txt)|*.txt|All Files|*.*', 'txt') then
  begin
    // Successful; user clicked OK
    // Filename contains the selected filename
  end;
end;
Run Code Online (Sandbox Code Playgroud)