Orangevolt ANT Tasks » Tasks » Win32 related tasks » win32.registry » Element delete
Element deleteElement export

2.12.2.2.1.  Example

build.xml
<?xml version="1.0"?>  
      
  <project basedir="." name="myapp" default="main">
    <taskdef classpath="orangevolt-ant-tasks-1.3.2.jar" resource="com/orangevolt/tools/ant/taskdefs.properties"/>
      
    <target name="main">
        <!--
          deletes the "bounds" and "history" entry of
          HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Orangevolt\xmlwrite
        -->
      <win32.registry root="HKEY_LOCAL_MACHINE"
                      key="SOFTWARE\Microsoft\Windows\CurrentVersion\Orangevolt">  
        <delete subkey="xmlwrite" entry="bounds"/>
        <delete subkey="xmlwrite" entry="history"/>
      </win32.registry>
    
      ...
    
        <!--
          deletes the "xmlwrite" and "xpathspy" subtree of
          HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Orangevolt
        -->
      <win32.registry root="HKEY_LOCAL_MACHINE"
                      key="SOFTWARE\Microsoft\Windows\CurrentVersion\Orangevolt">  
        <delete subkey="xmlwrite"/>
        <delete subkey="xpathspy"/>
      </win32.registry>
      
      ...
    
          <!--
            deletes the whole "Orangevolt" subtree of
            HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
          -->
      <win32.registry root="HKEY_LOCAL_MACHINE"
                      key="SOFTWARE\Microsoft\Windows\CurrentVersion\Orangevolt">  
        <delete/>
      </win32.registry>
      
      </target>
  </project>