RegistryValue element
Used to create a registry value. For multi-string values, this can be used to prepend or append values.
For legacy authoring: Use several of these elements to specify each registry value in a multiString registry value. This element cannot be used if the Value attribute is specified unless the Type attribute is set to ‘multiString’.
Attributes
Section titled “Attributes”Action
RegistryValueActionUnionThis is the action that will be taken for this registry value. If not specified, the default is ‘write’.
Id
stringPrimary key used to identify this particular entry. If this attribute is not specified, an identifier will be generated by hashing the parent Component identifier, Root, Key, and Name.
Key
stringThe localizable key for the registry value. If the parent element is a RegistryKey, this value may be omitted to use the path of the parent, or if its specified it will be appended to the path of the parent.
KeyPath
boolSet this attribute to ‘yes’ to make this registry key the KeyPath of the parent component. Only one resource (registry, file, etc) can be the KeyPath of a component.
Name
stringThe localizable registry value name. If this attribute is not provided the default value for the registry key will be set instead. The Windows Installer allows several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate values in the Action attribute to get the desired behavior.
Root
RegistryRootTypeThe predefined root key for the registry value. This attribute’s value must be one of the following:
- HKMU: A per-user installation will make the operation occur under HKEY_CURRENT_USER. A per-machine installation will make the operation occur under HKEY_LOCAL_MACHINE.
- HKCR: Operation occurs under HKEY_CLASSES_ROOT. When using Windows 2000 or later, the installer writes or removes the value from the HKCU\Software\Classes hive during per-user installations. When using Windows 2000 or later operating systems, the installer writes or removes the value from the HKLM\Software\Classes hive during per-machine installations.
- HKCU: Operation occurs under HKEY_CURRENT_USER. It is recommended to set the KeyPath attribute to
yeswhen setting this value for writing values in order to ensure that the installer writes the necessary registry entries when there are multiple users on the same computer. - HKLM: Operation occurs under HKEY_LOCAL_MACHINE.
- HKU: Operation occurs under HKEY_USERS.
Type
RegistryValueTypeUnionSet this attribute to the type of the desired registry key. If not specified, the default is ‘string’.
Value
stringSet this attribute to the localizable registry value. This value is formatted. The Windows Installer allows several special values to be set for this attribute. You should not use them in WiX. Instead use appropriate values in the Type attribute to get the desired behavior.