RemoveRegistryValues Action

Windows Installer

RemoveRegistryValues Action

The RemoveRegistryValues action can only remove values from the system registry that have been authored into the Registry table or the RemoveRegistry table. This action removes a registry value that has been authored into the Registry table if the associated component was installed locally or as run from source and is now set to be uninstalled. This action removes a registry value that has been authored into the RemoveRegistry table if the associated component is set to be installed locally or as run from source.

Sequence Restrictions

The InstallValidate action must be called before calling RemoveRegistryValues. If a WriteRegistryValues action is used, it must come after RemoveRegistryValues. RemoveRegistryValues must come before UnregisterMIMEInfo or UnregisterProgIDInfo.

A custom action can be used to add rows to the Registry table during an installation, uninstallation, or repair transaction. These rows do not persist in the Registry table and the information is only available during the current transaction. The custom action must therefore be run in every installation, uninstallation, or repair transaction that requires the information in these additional rows. The custom action must come before the RemoveRegistryValues and WriteRegistryValues actions in the action sequence.

ActionData Messages

Field Description of action data
[1] Registry path to key of removed registry value.
[2] Formatted string of name of removed registry value.

 

Remarks

To remove a registry value, record the value in the Value column of the Registry table. If the WriteRegistryValues action has attached REG_MULTI_SZ strings to the value in the Registry table, then the RemoveRegistryValues action removes only those strings from the registry value.


Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.