How to change registry key acl
Posted: Wed Jan 02, 2013 6:43 pm
I need permission to change a registry key for the user Everyone has Full Control access and this way I can delete this key.
I'm using this example
But only modifying this permission and not deleting my key..
I'll use some to clean some keys after uninstall my program
I'm using this example
Code: Select all
with RegistrySecurity(HKLM\SYSTEM\ControlSet001\Enum\Root\LEGACY_DMLOAD) do
begin
ProtectedDAcl := false;
DAcl.SetFileAccess(Everyone, True);
if DAcl.DeleteItems(Everyone) then
ShowMessage('OK')
else
ShowMessage('NOT OK');
end;
I'll use some to clean some keys after uninstall my program