1

I am using the sample code to create event source:

<DirectoryRef Id="TARGETDIR">
  <Component Id="RegistryEntries" Guid="PUT-GUID-HERE">
    <util:EventSource
      Name="Training Kiosk"
      Log="Application"
      EventMessageFile="[NETFRAMEWORK40FULLINSTALLROOTDIR]EventLogMessages.dll"
      />
  </Component>
</DirectoryRef>

How do I confirm whether event source is created?

David Martin
  • 11,764
  • 1
  • 61
  • 74
Mark
  • 2,181
  • 3
  • 19
  • 28

1 Answers1

2

EventSource creates rows in the Registry table; MSI reads those rows then writes them to the registry. So as long as the component is installed successfully, the event source will be "created"--because that's just a handful of registry entries.

Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
  • 1
    To validate the event log exists post installation in your application, you can use the method EventLog.SourceExists(string Source) – David Martin Nov 30 '11 at 08:35