Removing registry values

When it comes to uninstalling your product, you don't need to worry too much about the registry keys you've created. Windows Installer will make sure that all components, including registry keys, are cleaned up. However, in case you want to remove items from the registry that you didn't create—perhaps they were created by one of your other products—WiX provides a way to do it.

Two elements are used to remove data from the registry: RemoveRegistryKey and RemoveRegistryValue. We'll cover both in the following sections.

Remove all keys recursively

You'll use the RemoveRegistryKey element when you want to remove a key from the registry and all of its sub keys. It must be placed inside a Component element, as in this example: ...

Get WiX 3.6: A Developer's Guide to Windows Installer XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.