Create EventLog EventSource

Got a problem you cannot solve? Try here.
Post Reply
kwalpurgis
Posts: 3
Joined: Wed Oct 24, 2007 12:47 pm

Create EventLog EventSource

Post by kwalpurgis »

Whats the best way to create an EventLog EventSource during the install?
Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Post by Alex_Ronquillo »

You can log the setup execution. For logged Execution, run your setup in the following way:

Code: Select all

<setupfile> /l=<path_to_logfile>
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
kwalpurgis
Posts: 3
Joined: Wed Oct 24, 2007 12:47 pm

Post by kwalpurgis »

I'm sorry, I was not clear with my original question.

Our application writes errors to the Event Log using a custom Event Source. We would like to create the Event Source during the installation.

In C# we do the following:
EventSourceCreationData data = new EventSourceCreationData (_source, appName);
EventLog.CreateEventSource(data);

Could I create a console app that does the above and call it from the install? Is there anything build into InstallAware?

thanks
Alex_Ronquillo
Site Admin
Posts: 364
Joined: Mon Jul 30, 2007 11:51 am
Location: USA
Contact:

Post by Alex_Ronquillo »

You can create your application and run it in IA with the Run Program command.
Alejandro Ronquillo
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Post Reply