Skip to main content

RemoveRegistryValue element

Used to remove a registry value during installation. There is no standard way to remove a single registry value during uninstall (but you can remove an entire key with RemoveRegistryKey).

Windows Installer references

RemoveRegistry Table

Parents

Component

Attributes

Id (String) : Primary 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 (String) : The localizable key for the registry value.

Name (String) : The 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 (enumeration) : The 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 yes when 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.

Edit the schema for this page