我在使用WIX服务时遇到了一些麻烦。我的msi安装程序可以创建Service,但创建后安装程序无法启动它。有我的代码,我用于服务。
<Component Id="borland_comp" Guid="{6F723B32-E95A-4545-87FD-0B5F7B114FCA}" DiskId="1">
<File Id="server_ScktSrvr.exe" Name="ScktSrvr.exe" KeyPath="yes"/>
<ServiceInstall Id="BORLAND_Socket"
Name="Borland Socket Server"
DisplayName="Borland Socket Server"
Type="shareProcess"
Start="auto"
ErrorControl="normal"
Description="Borland Socket Server" />
<ServiceControl Id="StartWixServiceInstaller"
Name="Borland Socket Server" Start="install" Wait="no" />
<ServiceControl Id="StopWixServiceInstaller" Name="Borland Socket Server"
Stop="both" Wait="yes" Remove="uninstall"/>
</Component>
答案 0 :(得分:3)
我会将两个服务控制元素组合成:
<ServiceControl Id="scBSS" Name="Borland Socket Server" Stop="both" Start="install" Wait="yes" Remove="uninstall"/>
虽然这可能不是你的问题。安装程序是否尝试在安装期间启动它?你收到错误信息吗?如果您尝试在安装后启动它,您会收到错误消息吗?您是否已分析/调试服务本身以确保您没有丢失,依赖项或配置数据或在代码中抛出任何异常?