【问题标题】:Service does not install through installer服务未通过安装程序安装
【发布时间】:2016-12-13 12:07:27
【问题描述】:

我已经获得了一些服务,我必须创建一个安装程序来安装这些窗口服务并在成功安装后启动这些服务。正在通过命令提示符安装服务。但是通过安装程序我收到了这个错误

服务“RedBoxReportSchedulerService”(RedBoxReportSchedulerService) 启动失败。核实 你有足够的权限来启动系统服务

我确实检查了权限并通过服务属性进行了更改,但没有成功。

以下是仅安装一项服务的代码。

<Component Id ="RedBoxReportSchedulerServiceInstall" Directory="REPORTSCHEDULER" Guid="*">
    <File Id='ReportSchedulerServiceEXE' Name="RedBox Report Scheduler.exe" DiskId='1' Source="../Updatedir/Report Scheduler/ReportScheduler.exe"  KeyPath='yes'/>
    <ServiceInstall
    Id="ReportScheduler_ServiceInstaller"
    Type="ownProcess"
    Name="RedBoxReportSchedulerService"
    DisplayName="RedBox Report Scheduler"
    Description="RedBox Report Scheduler Service"
    Start="auto"
    Account="LocalSystem"
    Arguments=" /start RedBoxReportSchedulerService"
    ErrorControl="normal">
      <util:PermissionEx  User="Everyone" ServicePauseContinue="yes" ServiceQueryStatus="yes" ServiceStart="yes" ServiceStop="yes" ServiceUserDefinedControl="yes" />
    </ServiceInstall>
    <ServiceControl Id="Start_ReportScheduler_Service" Start="install" Stop="both" Remove="both" Name="RedBoxReportSchedulerService" Wait="no" />
  </Component>

谁能告诉我我做错了什么。我会很感激的。

【问题讨论】:

    标签: visual-studio-2010 service wix windows-installer


    【解决方案1】:

    ServiceControl 中的名称必须与 ServiceInstall 中的名称相同,但事实并非如此。您正在尝试启动一个名为 RedBoxReportSchedulerService 的不存在的服务。如果您转到服务控制面板小程序启动它,实际安装的服务可能会成功启动。

    所以这是显而易见的问题。为了完整起见,如果服务仍未启动,请继续执行以下操作:

    如果服务有任何跟踪诊断,则打开它们以查看服务是否正在启动和崩溃,或者没有响应启动。涉及协议,服务必须在(我认为)大约 30 秒内响应。诊断将告诉您服务是否实际启动。

    服务可能缺少依赖项。完全独立的代码文件很少见——它可能需要 C++ 运行时支持、贵公司的其他 Dll、.NET 框架版本等。安装后仍会安装服务,是吗?如果是这样,请从服务控制面板手动启动它并查看它是否启动。

    【讨论】:

      猜你喜欢
      • 2011-09-15
      • 2015-01-14
      • 2020-09-05
      • 2014-08-03
      • 1970-01-01
      • 2013-07-19
      • 1970-01-01
      • 1970-01-01
      • 2013-02-21
      相关资源
      最近更新 更多