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 a RegistryValue
. First, you'll store the value in a property by using a RegistrySearch
. 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> <DirectoryRef Id="INSTALLLOCATION"> <Component Id="CMP_CopyRegValue" Guid="747965AA-90F4-4262-BE55-3C1F4F7F65B4"> <RegistryValue Id="MyRegistryValue" KeyPath="yes" Root="HKLM" Key="Software\MyCompany\MyKey" Name="MyCopiedValue" ...