PC Review


Reply
Thread Tools Rate Thread

Custom install action does not register event log sources

 
 
Alhambra Eidos Kiquenet
Guest
Posts: n/a
 
      7th Jul 2008
Hi all,

Can somebody give me a hint why my custom install action does not register
event log sources, when I run the MSI package generated by VS2005.

The same install action DLL executed via installutil.exe registers evrything
just fine!

Here's the installer class that I have created:


Code Snippet
[RunInstaller(true)]
public class CustomEventLogInstaller :
System.Configuration.Install.Installer
{
public CustomEventLogInstaller()
{
InstallSource(Settings.Default.EventLogName,
Settings.Default.EventLogSourceAlertService);
InstallSource(Settings.Default.EventLogName,
Settings.Default.EventLogSourceSystem);
InstallSource(Settings.Default.EventLogName,
Settings.Default.EventLogSourceUser);
InstallSource(Settings.Default.EventLogName,
Settings.Default.EventLogSourceError);
}

/// <summary>
/// Installs the EventLog source.
/// </summary>
/// <param name="log">The event log name.</param>
/// <param name="source">The source name.</param>
private void InstallSource(string log, string source)
{
// Create an instance of an EventLogInstaller.
EventLogInstaller myEventLogInstaller = new EventLogInstaller();

// Unregister the source, if it already exists.
if (EventLog.SourceExists(source))
EventLog.DeleteEventSource(source);

// Set the source name of the event log.
myEventLogInstaller.Source = source;

// Set the event log that the source writes entries to.
myEventLogInstaller.Log = log;

// Leave the event log behind after uninstall.
myEventLogInstaller.UninstallAction = UninstallAction.NoAction;

// Add AutoMonEventLogInstaller to the Installer collection.
Installers.Add(myEventLogInstaller);
}
}


Any help is greatly appreciated.


--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft

 
Reply With Quote
 
 
 
Reply

« strings | How to? »
Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setup Project Install Custom Action Joe Cool Microsoft C# .NET 4 4th Feb 2010 12:52 PM
could not install the custom action. object not found. Sonja Microsoft Outlook Discussion 0 30th Dec 2009 11:58 AM
More Custom install action does not register event log sources Alhambra Eidos Kiquenet Microsoft C# .NET 1 7th Jul 2008 12:41 PM
Could not install the custom action George Quitugua Microsoft Outlook 3 14th Dec 2006 05:55 PM
running custom action at install Glenn M Microsoft Windows 2000 MSI 4 25th Jan 2005 09:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:25 PM.