首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何在使用Inno安装程序进行安装之前运行文件

如何在使用Inno安装程序进行安装之前运行文件
EN

Stack Overflow用户
提问于 2010-08-16 21:11:07
回答 1查看 28.6K关注 0票数 21

在安装程序开始之前,是否可以使用Inno安装程序运行文件?Documentation

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2010-08-16 21:30:05

是的。在[code]部分中,运行InitializeSetup()函数中的文件。此示例在安装程序运行之前启动记事本。

代码语言:javascript
复制
function InitializeSetup(): boolean;
var
  ResultCode: integer;
begin

  // Launch Notepad and wait for it to terminate
  if Exec(ExpandConstant('{win}\notepad.exe'), '', '', SW_SHOW,
     ewWaitUntilTerminated, ResultCode) then
  begin
    // handle success if necessary; ResultCode contains the exit code
  end
  else begin
    // handle failure if necessary; ResultCode contains the error code
  end;

  // Proceed Setup
  Result := True;

end;
票数 26
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3493416

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档