0
votes

I have created a windows service install package with wix and a console application. Both can be installed on Windows 7, 8 or server 2012 successfully.

But when I try to install on another windows server 2012 os, it seems windows service is installed successfully, no error message is displayed but when I open services.msc this windows service is not in the list. I checked windows logs it is written this service installed successfully.

What can be caused to this? Is there anyone experienced with this ? Here is my wix xml for windows service and this service is mapped to an executable application

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
 xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<Product Id="*" Name="HyperionII.Server.Svc.Setup" Language="1033"
         Version="2.0.0.0" Manufacturer="EAE Technology"
         UpgradeCode="54fd1cf3-3646-40eb-b182-0ca4732b1f16">

    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"
             AdminImage="yes" InstallPrivileges="elevated"/>

    <MajorUpgrade DowngradeErrorMessage="A newer version of [HyperionII.Server.Svc] is
already installed." />

    <MediaTemplate EmbedCab="yes"/>

    <Feature Id="ServerProductFeature" Title="HyperionII.Server.Svc.Setup" Level="1">
        <ComponentGroupRef Id="ServerProductComponents" />
  <ComponentRef Id="ServerSvcComponent"/>
    </Feature>
</Product>

<?define SourceDir = "C:\Program Files (x86)\Hyperion\Server Svc" ?>

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="HyperionFolder" Name="Hyperion">
      <Directory Id="ServerSvcFolder" Name="Server Svc">
        <Directory Id="StrongNameKeyFileFolder" Name="StrongNameKeyFile"/>
      </Directory>
    </Directory>
  </Directory>
 </Directory>
 </Fragment>

 <Fragment>
    <ComponentGroup Id="ServerProductComponents" Directory="ServerSvcFolder">
  <Component Id ="ServerSvcComponent" Guid="{35FB6173-9484-48CA-BA86-30B0A68B301D}">

    <File
      Id="HyperionII.Server.exe"
      Name="HyperionII.Server.exe"
      Source="$(var.SourceDir)\HyperionII.Server.exe"
      Vital="yes"
      KeyPath="yes"
      DiskId="1"/>

    <ServiceInstall
      Id="ServerSvcInstaller"
      Type="ownProcess"
      Vital="yes"
      Name="ServerSvc"
      DisplayName="HyperionII Server Service"
      Description="This service provides field operations, signal client"
      Start="auto"
      Account="LocalSystem"
      ErrorControl="ignore"
      Interactive="no">

      <util:ServiceConfig
        ServiceName="ServerSvc"
        FirstFailureActionType="restart"
        SecondFailureActionType="restart"
        ThirdFailureActionType="restart"
        RestartServiceDelayInSeconds="0"
        ResetPeriodInDays="1" />
    </ServiceInstall>

    <ServiceControl
      Id="StartService"
      Name="ServerSvc"
      Start="install"
      Stop="both"
      Remove="uninstall"
      Wait="no">
    </ServiceControl>

  </Component>
    </ComponentGroup>
   </Fragment>
 </Wix>
1
Take a verbose log of the install and see what's happening. "Seems windows service installed successfully" needs more deatil. Is the product in Programs&Features? Did you install it silently? If so it can also fail silently.PhilDW
@PhilDW, written in windows log it installed successfully and also product in Programs & Features list. I just uninstalled and restart server and reinstalled then i see my product in windows services list. I don't know the case but it is about windows anyway, I did not experience this problem one more time. If happens, will share more detail. Thanks for your help.mkartal

1 Answers

-1
votes

Just a guess. Did you refresh your Service control manager to verify that the service was indeed not showing up?