强制 Installshield 在安装前卸载

发布于 2024-07-15 04:35:03 字数 78 浏览 7 评论 0原文

我有一个 InstallShield 12 安装脚本。 我想在安装新版本之前卸载旧版本。 我将保持包的名称不变。 我怎样才能做到这一点?

I have an InstallShield 12 installscript. I want to uninstall the old version before installing the new version. I will keep the name of the package unchanged. How can I do this?

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

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

发布评论

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

评论(2

终止放荡 2024-07-22 04:35:03

假设这不是 MSI 项目并且您保留了相同的项目 GUID,则只需在 OnMaintUIBefore 函数中调用 ComponentUninstall() 即可。
如果项目 GUID 不同,您可以查看注册表中 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{PROJECT_GUID} 下的卸载字符串,然后使用该字符串执行 LaunchApp。

希望能帮助到你。

Assuming this is not an MSI project and youve kept the same Project GUID, you could simply call ComponentUninstall() in the OnMaintUIBefore function.
If the Project GUID is not the same you can look at the uninstall string in the registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{PROJECT_GUID} and then do a LaunchApp with that.

Hope it helps.

几度春秋 2024-07-22 04:35:03

对于基于 MSI 的项目,这可以通过为项目配置主要升级来完成。 InstallScript 项目不存在升级,但没有 Windows Installer 限制来阻止您同时运行多个安装。 您应该能够简单地在 InstallScript 代码中手动运行以前版本的卸载(可能在 OnFirstUIBefore 函数中)。

With an MSI-based project, this would be accomplished by configuring a Major Upgrade for your project. Upgrades don't exist for InstallScript projects, but there are no Windows Installer restrictions to keep you from running multiple installations simultaneously. You should be able to simply run the uninstallation of the previous version manually in your InstallScript code (maybe in the OnFirstUIBefore function).

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