Config Helper
Delete(RegistryLocation,String,String) Method
Example 



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

Parameters

location
subKey
keyName
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.Delete(RegistryLocation.CurrentUser, @"SOFTWARE\Kellerman Software\Registry Examples", "DeleteKeyTest");
'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.Delete(RegistryLocation.CurrentUser, "SOFTWARE\Kellerman Software\Registry Examples", "DeleteKeyTest")
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