Discussion:
Can setup create event sources?
(too old to reply)
Craig Wagner
2003-06-30 17:55:00 UTC
Permalink
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
2003-06-30 18:59:08 UTC
Permalink
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
Post by Craig Wagner
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?
Loading...