在安装过程中,我使用ServiceInstall和ServiceControl标签安装我的服务。但是,我的服务没有运行。我收到错误消息“请检查您是否有足够的权限启动服务”。但是,我在Administrators组中。我使用的是Wix 3.0版。
代码片段在这里,
<File Id='myexe' Name='myexe.exe' DiskId='1'
Source='myexe.exe' Vital='yes'>
</File>
<ServiceInstall Id='myService' DisplayName='MySampleService'
Name='MySampleService'
ErrorControl='normal' Start='auto'
Type='ownProcess' Vital='yes' />
<ServiceControl Id="StartService"
Name="MySampleService" Start="install" Wait="yes" />
<ServiceControl Id="StopService" Name="MySampleService"
Stop="both" Wait="yes" Remove="uninstall" />请帮帮我。
发布于 2009-03-13 01:19:14
这是当服务由于任何原因而无法安装或启动(如果您告诉它这样做的话)时得到的一般性错误。这非常令人沮丧。调试的唯一方法是慢慢地移除依赖项,直到事情最终正常运行。通常,该服务需要一些代码(GAC中的程序集?)直到稍后才能完全配置。
我通常通过查看Services.msc并在出现错误消息时尝试启动服务来进行调试。这通常比Windows Installer提供更好的错误消息。
发布于 2012-09-26 22:04:26
不要试图依赖于安装到全局程序集缓存GAC中的组件来启动.NET服务,ServiceStart对此还为时过早
发布于 2009-08-19 14:11:04
您还可以检查Window Eventlog以确定问题。如果问题是缺少二进制文件,则可以使用Depends找出缺少的内容。
https://stackoverflow.com/questions/609271
复制相似问题