在安装过程中使用 Inno Setup 删除未随 Inno Setup 安装的其他应用程序

发布于 2024-08-25 14:35:50 字数 434 浏览 4 评论 0原文

我有一个旧的 VB6 应用程序,它是使用非常旧的 16 位版本的 InstallShield 部署的。我已经使用 Inno Setup 创建了一个新的安装程序,以便通过更新对我的 VB6 应用程序进行 64 位友好。

我的所有用户都已安装现有的 InstallShield 版本。目前,我的 Inno Setup 正在运行。问题是,我不想覆盖旧的 InstallShield 安装文件,因此我的 Inno Setup 安装到另一个目录。这会导致问题,因为现在我安装了两个版本,有两个单独的图标。

当我安装新的 Inno Setup 版本时,我需要一种方法来调用旧 InstallShield 应用程序的卸载程序。如何通过 Inno Setup 从 Windows 添加/删除程序调用卸载程序?如果我重复使用 InstallShield 版本的应用程序 ID 与 Inno Setup 相同,然后手动删除旧文件,这样可以吗?

I have an old VB6 application that is deployed using a very old 16 bit version of InstallShield. I have created a new installer with Inno Setup to be 64 bit friendly for my VB6 application with updates.

All of my users already have the existing InstallShield version installed. Currently, I have Inno Setup working. The problem is, I do not want to overwrite the old InstallShield installation files, so my Inno Setup installs to another directory. This causes problems because now I have two versions installed, with two separate icons.

I need a way to invoke the uninstaller of the old InstallShield application when I install the new Inno Setup version. How do I call the uninstaller from the Windows Add/remove programs through Inno Setup? If i reuse the app id for the InstallShield version to be the same as the Inno Setup, and then manually delete the old files, would that work?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧伤还要旧人安 2024-09-01 14:35:50

您必须找到位于 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ 或 HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ 下的 InstallShield 卸载注册表项,然后执行其 UninstallString 值。完成后,删除注册表项:无法在 Inno Setup 中重复使用相同的注册表项,因为它始终将 _is1 附加到您的 AppId 以生成卸载注册表键名称。此外,在较旧的 Windows 版本上,由于长度限制,它还可能会截断此密钥名称并附加校验和。

通过 PrepareToInstall 事件函数完成所有这些操作。

You would have to locate the InstallShield uninstall registry key which will reside under either HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ or HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ and then execute its UninstallString value. Once that is done, delete the registry key: it is not possible to reuse the same key with Inno Setup since it will always append _is1 to your AppId to generate the uninstall registry key name. Additionally on older Windows versions it may also truncate this key name and append a checksum, because of length limitations.

Do all this from a PrepareToInstall event function.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文