【问题标题】:Failing to install the latest version of Windows Service无法安装最新版本的 Windows 服务
【发布时间】:2011-09-24 11:39:53
【问题描述】:

我正在我的桌面上安装特定版本的 Windows 服务。然后我修改了我的服务并在服务中进行了一些更改。我升级了我的安装程序版本。我将属性 RemovePreviousVersion 设为 true 并执行以下操作。在自定义操作中我添加 NOT PREVIOUSVERSIONSINSTALLED 然后我添加下面提到的代码。

System.ServiceProcess.ServiceController serviceController = new System.ServiceProcess.ServiceController("WinDbSync1");
        if (serviceController.Status != System.ServiceProcess.ServiceControllerStatus.Running)
        {
            serviceController.Start();

        }

我已经从链接Installing Higher Versions of existing Windows Service in VS 2008按照上述步骤获得了上述解决方案,它安装了windows服务,但不执行安装事件中编写的业务功能。如果我遗漏了任何内容,请告诉我步骤。另外我没有更改 exe 的版本。我只是更改安装程序的版本。

问候,

萨钦K

【问题讨论】:

    标签: c# windows-services installation windows-installer


    【解决方案1】:

    安装服务不需要自定义操作。 Windows Installer 已内置支持。

    http://msdn.microsoft.com/en-us/library/windows/desktop/aa371634(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa371637(v=VS.85).aspx

    【讨论】:

      猜你喜欢
      • 2014-09-10
      • 2021-12-20
      • 2018-10-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-07
      • 2020-08-01
      相关资源
      最近更新 更多