If you comment out the StartService ServiceControl, can you start the
service after you install?

-----Original Message-----
From: Elena Powell [mailto:epow...@microsoft.com] 
Sent: Wednesday, September 23, 2009 10:23 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Logonasservice user property not working

I am trying to use the LogonAsService property of User to grant the
appropriate rights to a service account, but am still getting "Service
'Connector' (Connector) failed to start. Verify that you have sufficient
privileges to start system services."  Does something look wrong in the
below service.xml code?

<?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 Name="Connector Service"
           Id="383399A4-5AC1-4454-B8EF-E03C26A50454"
           Language="1033" Version="1.0.0.0" Manufacturer="IT"
           UpgradeCode="05A9B21B-C2B8-4be0-ABAC-538C5A82E9C5">
    <Package InstallerVersion="200" Compressed="yes" />
    <Media Id="1" Cabinet="ServiceInstall.cab" EmbedCab="yes" />
    <Property Id='ExecXmlFile' Hidden='yes' />
    <Property Id='SERVICEPASSWORD' Hidden='yes' Secure='yes' />

    <Directory Id="TARGETDIR" Name="SourceDir" FileSource="C:\">
      <Directory Id="ProgramFilesFolder" Name="Program Files">
        <Directory Id="FolderService" Name="Connector Service">
          <Component Id="InstallService"
Guid="13BD0DDC-C08C-496a-AD44-2CAF6614B1B4">
            <util:User Id="ServiceAccountUser" Domain="[SERVICEDOMAIN]"
Name="[SERVICEUSERNAME]" CreateUser="no" LogonAsService="yes"
UpdateIfExists="yes"/>
            <File Id="SVCA01" Name="ConnectorCore.dll"
                  Source="SourceFiles\ConnectorCore.dll" KeyPath="no"/>
            <File Id="SVCA02" Name="ConnectorService.exe"
                  Source="SourceFiles\ConnectorService.exe" KeyPath="yes"/>
            <File Id="SVCA03" Name="ConnectorService.exe.config"
                  Source="SourceFiles\ConnectorService.exe.config"
KeyPath="no"/>
            <ServiceInstall Id="Connector"
                            Name="Connector"
                            DisplayName="Connector"
                            Type="ownProcess"
                            Start="auto"
                            ErrorControl="normal"
                            Description="Connector Service"
                            Account="[SERVICEDOMAIN]\[SERVICEUSERNAME]"
                            Password="[SERVICEPASSWORD]" />
            <ServiceControl Id="StartService"
                            Name="Connector" Start="install" Wait="no" />
            <ServiceControl Id="StopService" Name="Connector"
                            Stop="both" Wait="yes" Remove="uninstall" />
          </Component>
        </Directory>
      </Directory>
    </Directory>
    <Feature Id="MainFeature" Title="MainInstallation" Level='1'>
      <ComponentRef Id="InstallService"/>
    </Feature>
  </Product>
</Wix>
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to