【问题标题】:Create installer with Installshield that installs Windows Service使用安装 Windows 服务的 Installshield 创建安装程序
【发布时间】:2015-03-21 13:07:52
【问题描述】:

我有一个 Windows 服务,它通过在 cmd 中使用命令行 --install 执行它来自行安装。该服务还知道如何通过在 cmd 中传递 --uninstall 参数来卸载自身。

我需要创建一个 MSI 安装程序来安装此服务并启动它。我尝试过在 Installshield 中使用组件并使用自定义操作,但无论哪种方式都没有获得正确的结果。

我需要一些帮助。谢谢

【问题讨论】:

    标签: windows-services installshield


    【解决方案1】:

    请在Wix installer to replace INSTSRV and SRVANY for user defined service installation下查看我的回答

    WiX ServiceInstall 和 ServiceControl 元素是底层 Windows Installer ServiceInstall 和 ServiceControl 表的抽象。 InstallShield 使用相同的功能,但不是作为 XML 编写的,而是在高级设置下的组件视图中编写的。组件的服务区域。

    通常,调用自定义操作来注册服务并不是 Windows 安装程序的最佳做法。而是找出由 --install 命令完成的详细信息,并使用 InstallShield 将它们本地创作到这些表中。

    Installing, Controlling, and Configuring Windows Services

    【讨论】:

    • 所以,我绝对不能重写我的应用程序代码,所以我需要创建一个自定义操作,在安装期间使用 --install 参数执行服务可执行文件,在卸载期间使用 --uninstall 参数执行服务可执行文件。问题仍然存在,我该怎么做?
    • 你不需要重写应用程序代码,你只是不调用 --install --uninstall 例程。您只需剖析他们在做什么,并根据 Windows Installer 最佳实践在 InstallShield 中编写它们。你问的问题是错误的问题。
    • 我按照你说的做了,看起来是对的。我只是在安装后启动服务时遇到了一些问题,但这是正确的方法。
    • 有时我会将安装程序设置为在安装过程中不启动它,直到解决此问题。您只需对服务进行分析,找出缺失的内容并进行修复。
    猜你喜欢
    • 2011-12-28
    • 2016-10-11
    • 2013-02-21
    • 2010-10-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多