如何使用WiX创建事件日志源 [英] How do you create an event log source using WiX

查看:75
本文介绍了如何使用WiX创建事件日志源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为使用自定义事件日志源的网站创建安装程序.我希望基于WiX的安装程序在安装过程中创建该事件日志源.

I'm creating an installer for a website that uses a custom event log source. I would like our WiX based installer to create that event log source during installation.

有没有人知道使用WiX框架执行此操作的最佳方法.

Does anyone know the best way to do this using the WiX framework.

推荐答案

Wix具有开箱即用的创建事件日志源的支持.

Wix has out-of-the-box support for creating event log sources.

假设您使用的是Wix 3,首先需要在您的Votive项目或命令行中添加对WixUtilExtension的引用.然后,您可以在组件下添加EventSource元素:

Assuming you use Wix 3, you first need to add a reference to WixUtilExtension to either your Votive project or the command line. You can then add an EventSource element under a component :

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
    xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

    <Component ...>
        ...
        <util:EventSource Log="Application" Name="*source name*"
           EventMessageFile="*path to message file*"/>
        ...
    </Component>

如果这是一个.NET项目,则可以使用框架目录中的EventLogMessages.dll作为消息文件.

If this is a .NET project, you can use EventLogMessages.dll in the framework directory as the message file.

这篇关于如何使用WiX创建事件日志源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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