Wix和Eventlog [英] Wix and Eventlog

查看:220
本文介绍了Wix和Eventlog的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过如何创建活动使用WiX的日志源。我的问题是在Wix中指定事件源的常见用途(场景)是什么?我正在考虑,指定源将在事件日志中列出您的应用程序的安装/卸载过程,以便过滤/检查,但即使这样,源代码显示为MsiInstaller。我做错了什么,或者我误会了使用 util:EventSource

I have seen How do you create an event log source using WiX. My question is what is the common use (scenario) of specifying Event Source in Wix? I was thinking that specifying the source would list your application's install/uninstall process under that source in the event log so it would be easy to filter/check but even after doing that the source shows up as MsiInstaller for me. What am I doing wrong or am I misunderstanding the use of util:EventSource?

这是我的代码: / p>

Here is my code :

          <Component Id="EventLogSettings" Guid="A456420B-21E7-4306-904E-5CD3822193F0">
            <util:EventSource Log="Application" Name="WixSample" SupportsErrors ="yes" SupportsInformationals ="yes" SupportsWarnings ="yes" EventMessageFile="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\EventLogMessages.dll" KeyPath="yes"/>
            <!--<?if $(var.Platform) = x64 ?>
            <util:EventSource Log="Application" Name="WixSample" EventMessageFile="[NETFRAMEWORK20INSTALLROOTDIR64]EventLogMessages.dll" KeyPath="yes" />
            <?else ?>
            <util:EventSource Log="Application" Name="WixSample" EventMessageFile="[NETFRAMEWORK20INSTALLROOTDIR]EventLogMessages.dll" KeyPath="yes" />
            <?endif ?>-->
          </Component>

正如你所看到的,我尝试了两个选项。他们中的每一个都在Computer\HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\WixSample中创建一个注册表项,但我不确定是否需要引用WixNetFxExtension。如果我那么那么安装非.NET应用程序呢?在这种情况下我该怎么办?

As you can see I tried two options. Each of them creates a registry entry in the Computer\HKLM\SYSTEM\CurrentControlSet\services\eventlog\Application\WixSample but I am not sure if I need to reference the WixNetFxExtension. If I do then what about installation of non .net application? What do I do in those cases?

推荐答案

你误会了 EventSource 。 EventSource用于为您的应用程序创建自定义源,以便在日志记录到Windows事件日志中使用。

You are misunderstanding EventSource. EventSource is used to create a custom source for your application to use in it's logging to the windows event log.

您将始终看到应用程序的安装/卸载显示作为MsiInstaller。

You will always see the install/uninstall of your application show up as MsiInstaller.

这篇关于Wix和Eventlog的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆