【发布时间】:2014-04-02 20:21:27
【问题描述】:
我基于此example 创建了我的事件源。我的事件源如下所示:
[EventSource(Name = "Samples-EventSourceDemos-EventLog")]
public sealed class MinimalEventSource : EventSource
{
public static MinimalEventSource Log = new MinimalEventSource();
[Event(1, Message = "{0} -> {1}", Channel = EventChannel.Admin)]
public void Load(long baseAddress, string imageName)
{
WriteEvent(1, baseAddress, imageName);
}
}
示例使用代码来模拟安装/卸载过程。从其他一些 SO 问题中,我看到另一个 example 使用事件消息文件安装事件源。
但是它缺少一些如何安装/注册由清单定义的事件源的好例子。我正在调查使用 CustomAction 执行以下操作:
wevtutil.exe im <EtwManifestManFile> /rf:"EtwManifestDllFile" /mf:"EtwManifestDllFile"
但想知道您是否有任何建议?
【问题讨论】:
标签: c# wix event-log wix3.5 eventlog-source