Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Installation 使用WIX安装Windows服务_Installation_Wix - Fatal编程技术网

Installation 使用WIX安装Windows服务

Installation 使用WIX安装Windows服务,installation,wix,Installation,Wix,我对WIX服务有一些问题。我的msi安装程序可以创建服务,但创建后安装程序无法启动它。这是我的代码,我用于服务 <Component Id="borland_comp" Guid="{6F723B32-E95A-4545-87FD-0B5F7B114FCA}" DiskId="1"> <File Id="server_ScktSrvr.exe" Name="ScktSrvr.exe" KeyPath="yes"/> <Service

我对WIX服务有一些问题。我的msi安装程序可以创建服务,但创建后安装程序无法启动它。这是我的代码,我用于服务

<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>

我会将两个服务控制元素组合成:

  <ServiceControl Id="scBSS" Name="Borland Socket Server" Stop="both" Start="install" Wait="yes" Remove="uninstall"/> 


虽然这可能不是你的问题。安装程序是否在安装过程中尝试启动它?你收到错误信息了吗?如果在安装后尝试启动,是否会收到错误消息?您是否对服务本身进行了分析/调试,以确保没有丢失依赖项或配置数据或在代码中引发任何异常?

是的,我收到一条“错误1053:服务没有及时响应启动或控制请求”。但我可以使用CMD安装和运行此服务。请尝试取出ServiceControl元素,并在isntall完成后手动启动服务(net start)。这是有效的还是失败的?