How to remove a value from a Registry Key
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 | 'Registry - How to remove a value from a Registry Key Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, _ ByVal lpSubKey As String, phkResult As Long) As Long Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" _ (ByVal hKey As Long, ByVal lpValueName As String) As Long Private Const HKEY_LOCAL_MACHINE = &H80000002 Private Sub Command1_Click() Dim lRegKey As Long Call RegOpenKey(HKEY_LOCAL_MACHINE, "Software\TestKey\", lRegKey) Call RegDeleteValue(lRegKey, "Test Value") End Sub |