to use the madsecurity to block access to a key?
I do not know how to use new code right, someone can help me
block access to a key?
You can use something like this:
This would deny the STANDARD_RIGHTS to the current user. See MS documentation about which exact rights exist for registry keys, if STANDARD_RIGHTS isn't what you need. Of course instead of "CurrentUser" you can also use any other user. See madSecurity help for more information.
The above code will only work if you have enough access rights to change the DAcl of the specified registry key, of course...
Code: Select all
RegistrySecurity(regKeyHandle).DAcl.NewItem(CurrentUser, STANDARD_RIGHTS, atDenied);
The above code will only work if you have enough access rights to change the DAcl of the specified registry key, of course...
-
- Posts: 3
- Joined: Fri Oct 09, 2009 7:35 pm
procedure TForm1.Button1Click(Sender: TObject);
begin
end;
Correct ?
begin
Code: Select all
RegistrySecurity('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup').DAcl.NewItem(CurrentUser, STANDARD_RIGHTS_REQUIRED, atDenied);
Correct ?