问题描述
我将Inno Setup用于安装程序.我在unins000.exe
内的VersionInfo有问题.为了在安装程序中填充VersionInfo,我使用了指令AppPublisher
,AppCopyright
等.但这并不影响安装程序卸载程序unins000.exe
.
I use Inno Setup for my installers. I have a problem with VersionInfo inside unins000.exe
. For filling VersionInfo in installer I used directives AppPublisher
, AppCopyright
and etc. But it doesn't affect setup uninstaller unins000.exe
.
Google和帮助对此一无所知.我调查了Inno Setup的来源,发现只是为安装文件添加了VersionInfo:
Google and help doesn't know anything about this issue. I investigated Inno Setup sources and found appending VersionInfo just for setup file:
{ Update version info }
AddStatus(SCompilerStatusUpdatingVersionInfo);
UpdateVersionInfo(ExeFile, VersionInfoVersion, VersionInfoProductVersion, VersionInfoCompany,
VersionInfoDescription, VersionInfoTextVersion,
VersionInfoCopyright, VersionInfoProductName, VersionInfoProductTextVersion);
{ For some reason, on Win95 the date/time of the EXE sometimes
doesn't get updated after it's been written to so it has to
manually set it. (I don't get it!!) }
UpdateTimeStamp(ExeFile.Handle);
finally
ExeFile.Free;
end;
end;
{ Sign }
if SignTools.Count > 0 then begin
AddStatus(SCompilerStatusSigningSetup);
Sign(ExeFileName);
end;
except
EmptyOutputDir(False);
raise;
end;
但是我在卸载程序的编译代码中找不到此例程.
But I can't found this routines in uninstaller compile code.
任何人都知道,可以将版本信息发送到unins000.exe
吗?
Anybody know, is possible place version info to unins000.exe
?
谢谢!
推荐答案
Inno Setup不支持此功能.
Inno Setup does not support this.
您必须在编译时自行修改版本信息.
You would have to modify the version info yourself on compile time.
Imo,在链接到安装程序之前访问卸载程序可执行文件的唯一方法是滥用 SignTool
回调".设置为SignTool
的命令实际上可以对可执行文件执行任何操作,而不仅仅是对其签名".但是无论如何都必须对其进行签名"(Inno Setup在工具"完成后会明确检查可执行文件是否已签名).
Imo, the only way to access the uninstaller executable before it is linked into the installer is to abuse the SignTool
"callback". The command set to SignTool
can actually do anything with the executable, not only "sign" it. But it has to "sign" it in any case (Inno Setup explicitly checks that the executable was signed after the "tool" finishes).
您可以通过将SignTool
设置为最终将运行实际signtool.exe
的批处理文件(或其他脚本)来实现,但是在此之前,它将修改版本信息(例如,使用资源黑客命令行).
You can achieve that by setting SignTool
to a batch file (or other script) that will run the actual signtool.exe
in the end, but before that, it will modify the version info (e.g. using Resource Hacker command-line).
这篇关于Inno Setup卸载程序VersionInfo的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!