我见过How do you create an event log source using WiX。我的问题是在Wix中指定事件源的常见用法(场景)是什么?我在想,指定源代码会在事件日志中列出你的应用程序在该源下的安装/卸载过程,因此很容易过滤/检查,但即使这样做,源代码也会显示为MsiInstaller。我做错了什么或者我误解了util:EventSource
的使用?
这是我的代码:
<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应用程序呢?在这些情况下我该怎么做?
答案 0 :(得分:0)
你误解了EventSource。 EventSource用于为应用程序创建自定义源,以便在日志记录到Windows事件日志时使用。
您将始终看到应用程序的安装/卸载显示为MsiInstaller。