3

如果我想创建注册表项

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MyApp

带有字符串值

事件消息文件:C:\Path\To\File.dll

如何在我的WiX 3.0 WXS 文件中定义它?非常感谢 XML 应该是什么样子的示例。

4

5 回答 5

5

您似乎想创建一个事件日志源。如果是这种情况,您应该查看 util 扩展中的<EventSource>元素。

于 2008-09-27T23:09:03.440 回答
1

看看这个页面。一个例子是:

<registry action="write" 
 root"HKLM" key="SYSTEM\CurrentControlSet\Services\Eventlog\Application\MyApp"
 type="string" value="EventMessageFile : C:\Path\To\File.dll" />
于 2008-09-24T11:20:57.187 回答
1

我和这个一起去了:

<Component Id="EventLogRegKeys" Guid="{my guid}">
    <RegistryKey Id="Registry_EventLog" Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\Eventlog\Application\MyApp" Action="create">
        <RegistryValue Id="Registry_EventLog_EventSourceDll" Action="write" KeyPath="yes" Name="EventMessageFile" Type="string" Value="C:\Path\To\File.dll" />
    </RegistryKey>  
</Component>
于 2008-09-24T13:02:16.537 回答
1

最好使用文件引用语法来引用 File.dll,以确保使用它安装到的实际路径。使用[#filekey],其中filekey是描述文件IdFile元素。

于 2008-09-24T15:58:59.110 回答
0

在 DirectoryRef --> Directory... 下使用以下内容

<组件 ID="RegisterAddReferencesTab32" Guid="D9D01248-8F19-45FC-B807-093CD6765A60">

  <RegistryValue Action="write" Id="RegInstallDir32" Key="HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MyApp" Root="HKLM" Type="string" Value="C:\Path\To\File .dll" />

</组件>

于 2008-09-24T11:16:00.007 回答