How do you create an event log source using WiX

Wix has out-of-the-box support for creating event log sources. Assuming you use Wix 3, you first need to add a reference to WixUtilExtension to either your Votive project or the command line. You can then add an EventSource element under a component : <Wix xmlns=”http://schemas.microsoft.com/wix/2006/wi” xmlns:util=”http://schemas.microsoft.com/wix/UtilExtension”> <Component …> … <util:EventSource Log=”Application” Name=”*source name*” EventMessageFile=”*path to … Read more

System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security

I got the same exception when trying to install a service from the command line when using installutil in Windows 7. The solution was to open the command line as Administrator and then run installutil. Also you may find it easier to use a framework like TopShelf to host your services, because it manages all … Read more

The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security [duplicate]

See creating a registry key. This problem can occur not only due to permissions, but also due to event source key missing because it wasn’t registered successfully (you need admin privileges to do it – if you just open Visual Studio as usual and run the program normally it won’t be enough). Make sure that … Read more

The source was not found, but some or all event logs could not be searched

EventLog.SourceExists enumerates through the subkeys of HKLM\SYSTEM\CurrentControlSet\services\eventlog to see if it contains a subkey with the specified name. If the user account under which the code is running does not have read access to a subkey that it attempts to access (in your case, the Security subkey) before finding the target source, you will see … Read more

How to create Windows EventLog source from command line?

Try “eventcreate.exe” An example: eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO MYEVENTSOURCE /D “My first log” This will create a new event source named MYEVENTSOURCE under APPLICATION event log as INFORMATION event type. I think this utility is included only from XP onwards. Further reading Windows IT Pro: JSI Tip 5487. Windows XP includes … Read more

System.Security.SecurityException when writing to Event Log

To give Network Service read permission on the EventLog/Security key (as suggested by Firenzi and royrules22) follow instructions from http://geekswithblogs.net/timh/archive/2005/10/05/56029.aspx Open the Registry Editor: Select Start then Run Enter regedt32 or regedit Navigate/expand to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security Right click on this entry and select Permissions Add the Network Service user Give it Read permission … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)