开发者

Install Windows Service using WIX

开发者 https://www.devze.com 2023-01-24 08:33 出处:网络
I have some troubles with WIX Services. My msi installer can create Service, but after creation installer can\'t start it. There is my code, which I use for Service.

I have some troubles with WIX Services. My msi installer can create Service, but after creation installer can't start it. There is my code, which I use for 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="uninst开发者_高级运维all"/>

      </Component>


I would combine the two Service Control elements to become:

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

Although that probably isn't your problem. Does the installer attempt to start it during the install? Do you get an error message? If you try to start it after the install do you get an error message? Have you profiled / debug the service itself to make sure you aren't missing and dependencies or configuration data or throwing any exceptions in the code?

0

精彩评论

暂无评论...
验证码 换一张
取 消