【问题标题】:Install windows service without using InstallUtil or Setup Installation在不使用 InstallUtil 或安装程序安装的情况下安装 windows 服务
【发布时间】:2011-07-15 02:15:37
【问题描述】:

我想向我们的客户发送一个没有 InstallUtil 的 Windows 服务程序(无权分发),这将是同一台机器上的多个安装。

此时我发现了一些东西:Inno Setup for Windows service?

但我不清楚如何:

  • 添加 InnoSetup 脚本以及在哪里添加此脚本?
  • 对于 if 和 else:System.Environment.UserInteractive?如果一个服务没有安装,那么它会进入这个 if?

提前致谢。

【问题讨论】:

    标签: windows windows-services


    【解决方案1】:

    我提供了有关如何使用 C# 将命令行安装/卸载添加到 Windows 服务的分步解决方案。此解决方案可让您避免使用 InstallUtil

    How to make a .NET Windows Service start right after the installation?

    【讨论】:

    • 这很好用!非常感谢!你知道为什么 Console.Writeline("ALALA") 不打印到屏幕上吗?提前致谢
    【解决方案2】:

    您需要将安装程序添加到您的服务设置项目和自定义操作。 This article 将帮助您入门。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-04
      • 1970-01-01
      • 2010-09-07
      • 1970-01-01
      • 2013-02-21
      • 1970-01-01
      • 1970-01-01
      • 2013-10-24
      相关资源
      最近更新 更多