在安装过程中使用Inno Setup删除未与Inno Setup一起安装的其他应用程序 [英] Use Inno Setup to delete another application not installed with Inno Setup during installation
问题描述
我有一个旧的VB6应用程序,它使用非常旧的16位版本的InstallShield进行了部署.我已经使用Inno Setup创建了一个新安装程序,使其对我的VB6应用程序具有64位友好性,并且具有更新.
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.
我所有的用户都已经安装了现有的InstallShield版本.目前,我正在使用Inno Setup.问题是,我不想覆盖旧的InstallShield安装文件,因此我的Inno安装程序安装到另一个目录.这会导致问题,因为现在我安装了两个版本,带有两个单独的图标.
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.
当我安装新的Inno Setup版本时,我需要一种方法来调用旧的InstallShield应用程序的卸载程序.如何通过Inno Setup从Windows添加/删除程序"中调用卸载程序?如果我将InstallShield版本的应用程序ID重新使用为与Inno Setup相同,然后手动删除旧文件,那行得通吗?
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?
推荐答案
您将必须找到InstallShield卸载注册表项,该注册表项将位于HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
或HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
下,然后执行其UninstallString
值.完成此操作后,删除注册表项:不能在Inno Setup中重复使用相同的项,因为它将始终将_is1
附加到您的AppId
上以生成卸载注册表项名称.另外,在旧版Windows中,由于长度限制,它也可能会截断该键名并附加一个校验和.
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.
通过PrepareToInstall
事件函数执行所有这些操作.
Do all this from a PrepareToInstall
event function.
这篇关于在安装过程中使用Inno Setup删除未与Inno Setup一起安装的其他应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!