Config Helper
DeleteSubKeyTree(RegistryLocation,String) Method
Example 



KellermanSoftware.ConfigHelper Namespace > RegistryReaderWriter Class > DeleteSubKeyTree Method : DeleteSubKeyTree(RegistryLocation,String) Method
Delete a sub key tree for the passed location and subkey. Requires local admin rights, even in the CurrentUser location.
Syntax
Public Overloads Function DeleteSubKeyTree( _
   ByVal location As RegistryLocation, _
   ByVal subKey As String _
) As Boolean
Dim instance As RegistryReaderWriter
Dim location As RegistryLocation
Dim subKey As String
Dim value As Boolean
 
value = instance.DeleteSubKeyTree(location, subKey)
public bool DeleteSubKeyTree( 
   RegistryLocation location,
   string subKey
)
public:
bool DeleteSubKeyTree( 
   RegistryLocation location,
   String^ subKey
) 

Parameters

location
subKey
Example
//Trial Mode
RegistryReaderWriter reg = new RegistryReaderWriter();
 
//License Mode
//RegistryReaderWriter reg = new RegistryReaderWriter("John Smith 10000", "psdfljksfdl==");
 
reg.Write(RegistryLocation.CurrentUser, @"SOFTWARE\Kellerman Software\Registry Examples", "DeleteKeyTest", "DeleteKeyTestValue");
 
reg.DeleteSubKeyTree(RegistryLocation.CurrentUser, @"SOFTWARE\Kellerman Software\Registry Examples");
'Trial Mode
Dim reg As New RegistryReaderWriter()
 
'License Mode
'Dim reg As New RegistryReaderWriter("John Smith 10000", "psdfljksfdl==")
 
reg.Write(RegistryLocation.CurrentUser, "SOFTWARE\Kellerman Software\Registry Examples", "DeleteKeyTest", "DeleteKeyTestValue")
 
reg.DeleteSubKeyTree(RegistryLocation.CurrentUser, "SOFTWARE\Kellerman Software\Registry Examples")
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RegistryReaderWriter Class
RegistryReaderWriter Members
Overload List