Installation and uninstallation of a custom event source has a pretty complex logic, so it is quite easy to make a mistake is some scenarios. It's hard to find out what was your problem without looking at your code; and it would be difficult for you to create a short code sample suitable for the post in your question yet manifesting the problem. Let's try another way first.
I use some code to structure event logging per different application of the software product and shared a small wrapper which demonstrates right techniques. In particular, is shows how to setup and clean-up.
Please see my past answer here:
How to create event log under a folder[
^].
I hope it will help you to see how to do it right. If you still cannot solve a problem, you will need to do a good for making the code sample I mentioned above. If you have some exception, don't forget to dump it (in file), output
Exception.Stack
and all inner exceptions (recursively) and mark all relevant lines in your source code. By the way, chances are, when you do all these preparations you will clearly understand your problem by yourself and will be able to solve it.
—SA