Inno Setup卸载程序VersionInfo

编程入门 行业动态 更新时间:2024-10-27 11:16:20
本文介绍了Inno Setup卸载程序VersionInfo的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我将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

本文发布于:2023-11-13 09:33:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584015.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:程序   Inno   Setup   VersionInfo

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!