Search code examples
windowsevent-loguninstallation

When creating an uninstaller, should I remove an event source?


When creating an uninstaller for a Windows app, should I remove an event source?

I'm not looking for a philosophical discussion, I'm looking for specific technical reasons why it may or may not be a good idea to remove an event source, esp. given that events written to that source will be left behind.


Solution

  • Good:

    1. Regarding to manifest-based event generation, it may be good idea to leave the source in the system so other event consumers can properly render messages generated by the source after the program is removed.

    Bad:

    1. Orphan event sources choke up the system registry.
    2. It is impossible to create new event source with the same name even in different channels. Hence, you will have to somehow manage conflict situations on re-install.