Question

How can I delete a Windows registry key?

How can I delete a Windows registry key?

Answer:

You can delete a registry key using a <registryDelete> action. If the key to delete does not exist, the action will be ignored. You will have to include a section like the one below inside an action list section of your XML installer project file.

<registryDelete>
 <key>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment</key>
 <name>MY_APPDIR</name>
</registryDelete>