Not enough permissions to install service

It should work without the WiX util extension. Here is my complete test installer. Create your own test project and copy and past my installer into your .wxs file. Then replace the File, ServiceInstall and ServiceControl paths and names with your own service. If you still get the same error message, could it be that you don't actually have the privileges to do the install on your machine?

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="TestServiceInstaller" Language="1033" Version="1.0.0.0" Manufacturer="test" UpgradeCode="d2b63c57-ca50-4f6a-8019-e826cac3d788">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" InstallPrivileges="elevated" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
    <MediaTemplate />

    <Feature Id="ProductFeature" Title="TestServiceInstaller" Level="1">
        <ComponentGroupRef Id="ProductComponents" />
    </Feature>
</Product>

<Fragment>
    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="INSTALLFOLDER" Name="TestServiceInstaller" />
        </Directory>
    </Directory>
</Fragment>

<Fragment>
    <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
  <Component Id="TestService.exe" Guid="196BB5E5-F157-4CA2-B740-0A68E1539B7C">
    <File Id="TestService.exe" Source="C:\Users\bryan.johnston\Documents\visual studio 2010\Projects\TestService\TestService\bin\Debug\TestService.exe" KeyPath="yes" />
    <ServiceInstall Id="TestService.exe" Name="TestService.exe" Account="LocalSystem" Arguments="-start" Start="auto" Interactive="yes" Type="ownProcess" Vital="yes" ErrorControl="critical" />
    <ServiceControl Id="TestService.exe" Name="TestService.exe" Stop="both" Start="install" Remove="uninstall" Wait="no" />
  </Component>
    </ComponentGroup>
</Fragment>
    </Wix>

The ServiceInstall Account must be fully qualified, as such:

<ServiceInstall ... Account="NT AUTHORITY\LocalService" />

It can fail if only specified like this:

<ServiceInstall ... Account="LocalService" />


Probably you have to set the permission for the your service, something like that:

<ServiceInstall Id="YourServiceID" Name="ServiceName" DisplayName="DisplayName"
    Description="Description"   
 Arguments="service start arguments" 
 Start="demand" Type="ownProcess" ErrorControl="ignore">
    <util:PermissionEx User="Authenticated Users" 
ServiceStart="yes" 
ServiceStop="yes" 
ServicePauseContinue="yes" 
ServiceInterrogate="yes" 
ServiceChangeConfig="yes" 
ServiceEnumerateDependents="yes" 
ServiceQueryConfig="yes" 
ServiceQueryStatus="yes" 
ServiceUserDefinedControl="yes" />
</ServiceInstall>
<ServiceControl Id="SvcControlID" Name="ServiceName" Stop="both" 
    Remove="uninstall" Wait="yes" />

and dont forget to include the UtilExtension: xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"

There is another way (but not recomended :) You could try to install it using custom actions:

<Property Id="CMD" Secure="yes"><![CDATA[cmd.exe]]></Property>
<CustomAction Id="InstallService32" Property="CMD" ExeCommand="/c &quot;&quot;[INSTALLLOCATION][ServiceName]&quot; /i [ServiceName] &quot;/c [SVC_CONFIG]&quot;&quot;" Execute="deferred" Impersonate="no" Return="ignore" />
<CustomAction Id="InstallService64" Property="CMD" ExeCommand="/c &quot;&quot;[INSTALLLOCATION][ServiceName]&quot; /i [ServiceName] &quot;/c [SVC_CONFIG]&quot;&quot;" Execute="deferred" Impersonate="no" Return="ignore" />    
<CustomAction Id="StartService" Property="CMD" ExeCommand="/c &quot;NET START [ServiceName]&quot;" Execute="deferred" Impersonate="no" Return="ignore" />
<CustomAction Id="StopService" Property="CMD" ExeCommand="/c &quot;NET STOP [ServiceName]&quot;" Execute="deferred" Impersonate="no" Return="ignore" />

The problem with this code is that you need to have the install location without the white spaces (I had a problem with white spaces and could not manage to solve it, probably you'll be more lucky).