RemoveRegistryKey element
Used for removing registry keys and all child keys during install or uninstall.
Windows Installer references
Registry Table, RemoveRegistry Table
Parents
Attributes
Action (enumeration) : This is the action that will be taken for this registry value. This attribute's value must be one of the following:
- removeOnInstall: Removes a key with all its values and subkeys when the parent component is installed.
- removeOnUninstall: Removes a key with all its values and subkeys when the parent component is uninstalled.
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.
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.