Innosetup - 在安装开始之前引用[Code]中的文件
这是这个问题的延续。我想将一个文件包含在我的安装包中(.CHM 帮助文件),我需要在安装过程中通过代码访问该文件。它不需要安装到用户的计算机上。所以我想要
- 将文件包含在安装包中,可能是未压缩的(所以我想我会使用 [Files] ... external
标志来做到这一点)。
- 在安装过程中引用该文件,代码如下:
procedure HelpButtonOnClick (Sender: TObject) ;
var
ErrorCode : Integer ;
begin
ShellExecAsOriginalUser ('open', ExpandConstant ('{???}') + '\MyHelp.chm', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end ;
那么我可以在安装开始之前引用该文件吗 - 即在将任何文件复制到用户计算机之前?如何指定文件的路径 ExpandConstant ('{???}')
?我在向导表单上有一个帮助按钮,可以调用上述处理程序。
This is sort of a continuation of this question. I have a file that I want to include with my installation package (a .CHM help file) that I need to access during installation from code. It doesn't need to be installed to the user's machine. So I want to
- include the file in the installation package, probably uncompressed (so I guess I will do that with a [Files] ... external
flag).
- reference the file during installation with code like:
procedure HelpButtonOnClick (Sender: TObject) ;
var
ErrorCode : Integer ;
begin
ShellExecAsOriginalUser ('open', ExpandConstant ('{???}') + '\MyHelp.chm', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end ;
So can I reference the file before installation starts - i.e. before any files are copied to the user machine? How do I specify the path ExpandConstant ('{???}')
to the file? I have a help button on the wizard form that calls the above handler.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这很容易。只要做
This is easy. Just do