【问题标题】:Can a Visual Studio Installer remove a program installed by a non Visual Studio Installer?Visual Studio 安装程序可以删除由非 Visual Studio 安装程序安装的程序吗?
【发布时间】:2011-01-15 08:07:05
【问题描述】:

我不久前发布了一个 dll 驱动程序的测试版,它使用了一个名为 Inno Setup 的基于脚本的安装程序,它做了三件事。

1) 将 dll 文件复制到目标文件系统上的特定目录
2) 执行 COM 注册
3) 执行包含在 dll 中的自定义注册方法

对于该软件的下一个版本,我已切换到使用 Visual Studio 中的安装项目作为安装程序。在此安装程序中,我希望能够检查目标是否安装了 beta 版本,并撤消上述三个步骤。实现这一目标的最佳方法是什么?

【问题讨论】:

    标签: visual-studio installation inno-setup setup-project uninstallation


    【解决方案1】:

    考虑使用 Windows Installer 自定义操作。

    查看 MSDN 上的示例并根据您的需要进行调整:

    Creating a Custom Action

    Using a Custom Action to Display a Message at Installation

    Using a Custom Action to Pre-Compile an Assembly at Installation

    【讨论】:

      【解决方案2】:

      您可以设置安装项目的 ID,以便将旧安装程序检测为新安装程序的先前版本 - 我没有使用 inno setup,所以我不确定它是否会工作,但是值得研究。

      如果该方法不起作用,您可能需要设置某种自定义操作,运行测试版卸载程序或直接删除旧文件。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2014-10-04
        • 1970-01-01
        • 2022-06-25
        相关资源
        最近更新 更多