我正在尝试创建一个将安装 Windows 服务的 WIX 安装程序。对于 Windows 服务,我完全按照http://tech.pro/tutorial/895/creating-a-simple-windows-service-in-csharp的概述创建了一个服务。
在我的 wxs 安装程序文件中,我指定了以下标记 -
<Component Id="MyCompanyWindowsServiceComponent" Guid="*">
<File Id="MyCompanyWindowsServiceFile" Name="SimpleWindowsService.exe" DiskId="1"
Source="..\SimpleWindowsService\bin\debug\SimpleWindowsService.exe"/>
<ServiceInstall Id="MyCompanyServiceInstall" Type="ownProcess" Vital="yes"
Name="MyCompany:MyProduct"
DisplayName="MyCompany:MyProduct"
Description="MyCompany Windows Service"
Start="auto"
Account="LocalSystem"
ErrorControl="critical"
Interactive="yes"/>
<ServiceControl Id="StartService"
Start="install"
Stop="both"
Remove="uninstall"
Name="MyCompany:MyProduct"
Wait="no"/>
</Component>
我有像这样引用的组件 -
<Feature Id="Complete" Level="1">
::
<ComponentRef Id="MyCompanyWindowsServiceComponent"/>
</Feature>
当我最终运行我的安装程序时,我看到文件已复制到正确的位置,但服务本身尚未启动。
我错过了什么?
问候