Groups | Blog | Home
all groups > dotnet setup > june 2003 >

dotnet setup : Can setup create event sources?


Craig Wagner
6/30/2003 10:55:00 AM
We have an application that needs to log to the Application event log, but
it uses a custom event source.

Currently we have a command-line app that uses EventLog.CreateEventSource to
create the event source in the Application event log.

This utility then needs to be distributed with the app, and the person
installing needs to make sure they run it.

As you can imagine, this is a little (okay, a lot) kludgy. It seems to me
that there should either be a way to run this app as part of the
installation or, better yet, the setup package should be able to create the
event source.

I've been looking at the options in the deployment project and searching the
internet and can't seem to find any reference to doing this.

Anyone?

Andy Elmhorst
6/30/2003 1:59:08 PM
Sure, look at the documenation for the "EventLogInstaller" class. This needs
to be added to your setup project as a custom action. If you haven't used
..Net custom actions yet, it may take you a bit to get it in to your
installer project, but there are a number of samples in the help.


- Andy

[quoted text, click to view]

AddThis Social Bookmark Button