How to deploy registry keys and values ​​using WiX 3.0?

If I want to create a registry key

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

with string value

EventMessageFile: C: \ Path \ To \ File.dll

How can I define this in my WiX 3.0 WXS file? Examples of how XML should look are very much appreciated.

+3
source share
5 answers

It seems you want to create an event log source. If so, you should take a look at the <EventSource> element in the util extension.

+5
source

Check this page . An example is:

<registry action="write" 
 root"HKLM" key="SYSTEM\CurrentControlSet\Services\Eventlog\Application\MyApp"
 type="string" value="EventMessageFile : C:\Path\To\File.dll" />
+1
source

:

<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>
+1

File.dll , , , . [#filekey], filekey - Id File, .

+1

Use the following command in DirectoryRef -> Directory ...

<Component Id = "RegisterAddReferencesTab32" Guid = "D9D01248-8F19-45FC-B807-093CD6765A60"> <RegistryValue Action = "write" Id = "RegInstallDir32" Key = "HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ Eventlog Application Root = "HKLM" Type = "string" Value = "C: \ Path \ To \ File.dll" /> </Component>
0
source

Source: https://habr.com/ru/post/1697444/


All Articles