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
Wix ServiceInstall未成功启动mywindowsservice_Wix_Serviceinstall - Fatal编程技术网

Wix ServiceInstall未成功启动mywindowsservice

Wix ServiceInstall未成功启动mywindowsservice,wix,serviceinstall,Wix,Serviceinstall,我正在尝试创建一个WIX安装程序来安装Windows服务。对于Windows服务,我创建了一个与概述完全相同的服务 在我的wxs安装程序文件中,指定了以下标记- <Component Id="MyCompanyWindowsServiceComponent" Guid="*"> <File Id="MyCompanyWindowsServiceFile" Name="SimpleWindowsService.exe" DiskId="1"

我正在尝试创建一个WIX安装程序来安装Windows服务。对于Windows服务,我创建了一个与概述完全相同的服务

在我的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>
当我最终运行安装程序时,我看到文件已复制到正确的位置,但服务本身尚未启动

我错过了什么


自Vista以来,交互式服务已被弃用。我不确定它们是否会在较新的操作系统上启动。您可能已编辑该WiX以删除实际的公司和产品名称,因此请检查ServiceControl中的名称是否与ServiceInstall中的名称完全相同,以防万一,但很可能它没有启动,因为它是交互式的。