How to delete a custom event log source?

F

Frank Powell

Does anyone have any idea how to remove a custom event
log source? It was created as part of a programming
exercise in a book I'm reading. Now I can't seem to find
a way to delete it. I suppose there isn't any harm in
leaving it but I'd rather get rid of it if possible.
 
Joined
Jun 2, 2006
Messages
1
Reaction score
0
How to delete your custom EVent log

Hi

go to [HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog]
and delete your custom log folder
 
Joined
Feb 27, 2008
Messages
1
Reaction score
0
That's very helpful; thanks a lot! I would add that for me the custom-log key also appeared in [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog], so it's probably worth checking all of them (ControlSet001, ControlSet002 etc.) and deleting the key wherever you find it.

Cheers,

Ed Graham
 
Joined
Jan 8, 2013
Messages
2
Reaction score
0
Instead of editing the registry it is better to create and delete eventlogs using the .net class
System.Diagnostics.EventLog.

If Microsoft decides to change the method your software will still work.

Create the eventLog
Use the static function System.Diagnostics.Eventlog.CreateEventSource
There are several versions of this function. One of the parameters is the string LogName

Delete the eventLog
Use the static function System.Diagnostics.Eventlog.DeleteEventSource
Use the same LogName that was used to create the event source

Look up the class EventLog to see how to write to the event log
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top