Code:
unit Primer;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,Registry, StdCtrls;
type
TForm1 = class(TForm)
CheckBox1: TCheckBox;
Label1: TLabel;
Button1: TButton;
Label2: TLabel;
Label3: TLabel;
procedure CheckBox1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.CheckBox1Click(Sender: TObject);
var DelphiReg: TRegistry;
begin
if CheckBox1.Checked=true then
begin
DelphiReg := TRegistry.Create;
DelphiReg.RootKey := HKEY_CURRENT_USER;
if DelphiReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Policies\System', True) then
DelphiReg.WriteInteger('DisableRegistryTools', 1);
DelphiReg.CloseKey;
CheckBox1.Caption:='Odselektuj da odblokiras editovanje registara!';
end
else
begin
DelphiReg := TRegistry.Create;
DelphiReg.RootKey := HKEY_CURRENT_USER;
if DelphiReg.OpenKey('Software\Microsoft\Windows\CurrentVersion\Policies\System', False) then
DelphiReg.DeleteValue('DisableRegistryTools');
DelphiReg.CloseKey;
CheckBox1.Caption:='Klikni da blokiras editovanje registara!';
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Close;
end;
end.
Evo ti i program posto iz profila ne znam da li si pogresio forum pa ti treba program za ono ili trazis kod tako da sam stavio i jedno i drugo.
OVDE NA OVOM LINKU imas kod source kod i gotov programcic koji ti resava problem.
Pozdrav, Vlada