Copying registry values
WiX doesn't provide a specific element for copying data from one registry value to another. However, you can accomplish this task by pairing a RegistrySearch
element with RegistryValue
. First, you'll store the value in a property by using a RegistrySearch
element. Then, you'll reference that property in the Value
attribute of the RegistryValue
element. Here's an example:
<Property Id="MY_REG_VALUE"> <RegistrySearch Id="MyRegistrySearch" Root="HKLM" Key="Software\MyCompany\MyKey" Name="MyDWORDValue" Type="raw" /> </Property> <ComponentGroup Id="RegistryComponents" Directory="INSTALLLOCATION"> <Component Id="CMP_CopyRegValue" Guid="747965AA-90F4-4262-BE55-3C1F4F7F65B4"> <RegistryValue Id="MyRegistryValue" KeyPath="yes" Root="HKLM" ...
Get WiX 3.6: A Developer's Guide to Windows Installer XML now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.