如何登录Inno Setup安装? [英] How can I log Inno Setup installations?
本文介绍了如何登录Inno Setup安装?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Inno Setup具有命令行参数/LOG="filename"
.我可以在Inno Setup脚本中指定日志文件名,以便稍后将其包含在错误报告中吗?
Inno Setup has command line parameter /LOG="filename"
. Can I specify a log filename from inside the Inno Setup script, so I can include it later in my error reports?
推荐答案
您可以设置SetupLogging
选项(SetupLogging=yes
),然后将以下代码集成到脚本中以将日志复制到某处.
You can set the SetupLogging
option (SetupLogging=yes
) then integrate the following code into your script to copy the log somewhere.
procedure CurStepChanged(CurStep: TSetupStep);
var
logfilepathname, logfilename, newfilepathname: string;
begin
logfilepathname := ExpandConstant('{log}');
logfilename := ExtractFileName(logfilepathname);
newfilepathname := ExpandConstant('{app}\') + logfilename;
if CurStep = ssDone then
begin
FileCopy(logfilepathname, newfilepathname, false);
end;
end;
这篇关于如何登录Inno Setup安装?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文