The knowledge base is no longer actively updated, we have moved all content to our Community Support Forum

How can I delete a Windows registry key?

Author: BitRock Support       Date: October 30, 2007 09:33       Tags: Actions

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>


Click here to download a sample project.xml file that integrates this functionality.