Does anyone know if there is a probem with Registry Deletekey in D4? Writing and reading are fine but neither the example in the help pages nor the following will do anything other than tell you it's failed.
Code:
procedure TfmMain.DeleteRegistryEntry(Subkey: string);
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
with Reg do
begin
RootKey := HKEY_CURRENT_USER;
if OpenKey('Sofware\Mine\Test', false) then
if ValueExists(Subkey) then
if not Reg.DeleteKey(Subkey) then
ShowMessage(Subkey+' not deleted');
end;
finally
Reg.Free;
end;
end;