[英]Install file in Inno Setup Pascal code using FileCopy function (not to show the installation on wizard form)
How to copy a file using FileCopy
function to the application folder, so that it's name does not display on the installing page?如何使用
FileCopy
功能将文件复制到应用程序文件夹,使其名称不显示在安装页面上? ( FilenameLabel
). (
FilenameLabel
)。
Ie I want to use the first option of Inno Setup - How to hide certain filenames while installing?即我想使用Inno Setup的第一个选项- 如何在安装时隐藏某些文件名? (FilenameLabel)
(文件名标签)
Use the FileCopy
function in the CurStepChanged
event function :在
CurStepChanged
事件函数中使用FileCopy
函数:
[Files]
Source: "MyProg.exe"; Flags: dontcopy
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
{ Install after installation, as then the application folder exists already }
if CurStep = ssPostInstall then
begin
Log('Installing file');
ExtractTemporaryFile('MyProg.exe');
if FileCopy(
ExpandConstant('{tmp}\MyProg.exe'), ExpandConstant('{app}\MyProg.exe'),
False) then
begin
Log('File installed.');
end
else
begin
Log('Failed to install file.');
end;
end;
end;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.