There's quite a few things missing from this...
Where is your ServiceInstall element?
Where is your File element?
Why are you setting LocalSystem permissions on a RegistryKey? (LocalSystem
already has Administrator type registry access)

WiX won't be trying to write into the EventLog that you have 'created'.  The
Service will still be responsible for that.
I suspect that you haven't configured the user properly in your WiX
ServiceInstall, and that is why it isn't starting, because it's not running
as
someone that is allowed to write into the EventLog, throwing an exception
because of this, and probably in your catch{} block you log the error
to the EventLog (which throws an exception aborting the service).

Please provide the full information.

I have created a Windows Service, it is installed by WiX, along with its own
EventLog source, and it happily writes to this EventLog without fail.
It runs as LocalSystem (just because I'm lazy, and don't want to create
individual folder permissions for a custom user)...


Regards,
Bevan Weiss

============================================================================
=============================
>
>Date: Wed, 12 Feb 2014 11:35:35 -0500
>From: Steven Dyson <sdyson1...@gmail.com>
>Subject: [WiX-users] Windows Service windows 7
>
>I created a dummy windows service for my first wix project.
>Ive added
> <Component Id="RegKeyPermissionComponent"
>Guid="A4FA2F01-DC4A-4CA7-995F-56947018EFCE" KeyPath="yes">
>        <RegistryKey Id="ApplicationEventLogAccess"  Root="HKLM"
>Key="SYSTEM\CurrentControlSet\Services\Eventlog\Application"
>Action="create">
>
>          <util:PermissionEx GenericAll="yes" Read="yes" Write="yes"
>User="LocalSystem"/>
>        </RegistryKey>
>
>and
>
>   <Package InstallerVersion="300" Compressed="yes"
>InstallScope="perMachine" InstallPrivileges="elevated"
>
>The service writes an entry to the eventlog.
>
>If i install the service with a .bat file it works fine. If i use the wix
installer it installs but does not start. If i remove the event log write,
it will start.
>
>What else can i do?
>
>
>-- 
>
>Steven Dyson

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to