Event Log Catch-22

E

Evan M.

I want to be able to write events from my .NET 2.0 Windows Form app
into the Application event log. With the source being my application
name. To do that, I need to create the event source, which requires
Administrative privilages. But the user running my application won't
have admin privilages, and I can't figure out anywhere how people are
getting these event sources registered during their installs.

I've been using the InstallShield 2008 Editor to create my MSI
packages to distribute the app to the users, but I can't see any
options here to register the event source within it.

Any help would be appreciated.
Evan
 
R

rhaazy

I want to be able to write events from my .NET 2.0 Windows Form app
into the Application event log. With the source being my application
name. To do that, I need to create the event source, which requires
Administrative privilages. But the user running my application won't
have admin privilages, and I can't figure out anywhere how people are
getting these event sources registered during their installs.

I've been using the InstallShield 2008 Editor to create my MSI
packages to distribute the app to the users, but I can't see any
options here to register the event source within it.

Any help would be appreciated.
Evan

//CODE FOR EVENT LOG
if (!
System.Diagnostics.EventLog.SourceExists("JBMLOGSource"))

System.Diagnostics.EventLog.CreateEventSource("JBMLOGSource",
"JBMLOG");
eventLog1.Source = "JBMLOGSource";
eventLog1.Log = "JBMLOG";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top