2010-07-20 78 views
1

我正在尝试创建一个wix安装程序来安装并启动Windows服务。
我收到以下错误: “Service”()无法安装。请确认您有足够的权限来安装系统服务“WIX:安装后启动WCF服务时出现错误

下面是我使用的脚本:

<File Id="filFBC5F84CB0C200C1A2F8FFB335A07753" KeyPath="yes" 
     Source="..\..\TestDotNet\Monarch.Server.WCF\EFI.Monarch.Server\bin\Release \EFIMonarchServer.exe" /> 
<ServiceInstall Id="MonarchServerServiceInstaller" 
       Type="ownProcess" Vital="yes" Name="EFI Monarch Server" 
       DisplayName="EFI Monarch Server" 
       Description="Testing EFI Monarch Server" 
       Start="auto" Account="LocalSystem" 
       ErrorControl="ignore" Interactive="yes" > 
</ServiceInstall> 
<ServiceControl Id="StartService" Start="install" 
       Stop="both" Remove="uninstall" 
       Name="DiskManagement" Wait="yes" /> 
+0

您可以在安装后手动启动服务吗? – 2010-07-20 14:22:35

+0

是的,我可以手动启动它。它仅在安装后尝试启动服务时出现此错误。 – sid 2010-07-21 03:36:46

+0

它的工作。我在servicecontrol元素中输入了错误的名字。 – sid 2010-07-21 07:45:50

回答

2

该消息始终是一个红鲱鱼这基本上意味着你有一个错误启动该服务。任何时候我把一个新的服务放到安装中,我首先离开ServiceControl元素并手动启动服务,如果它不启动,我(或开发人员)对它进行配置以找出原因,你可能会错过依赖关系,一个服务帐户的问题(不在这里),连接到数据库或读取一个xml文件的问题。关键是服务本身通常有问题。

一旦我可以手动启动它,我回去并将ServiceControl元素重新插入。

+0

我可以手动启动它。我不认为我错过了任何依赖。 – sid 2010-07-21 03:38:58

+0

您在GAC中的任何依赖关系?如果是这样,Windows安装程序中存在竞争问题,您无法启动取决于刚刚安装到GAC的文件的服务,因为MsiPublishAssemblies在服务尝试启动之后才会调用到Fusion中。 – 2010-07-22 02:26:54

+0

对于其他配置文件,请将servicecontrol元素重新放入,如果/当出现错误时,请尝试在挂起安装时手动启动它。 – 2010-07-22 02:27:35

相关问题