Z
zhangweizw
Unregistered / Unconfirmed
GUEST, unregistred user!
用程序修改注册表,很简单,为什么运行之后注册表没反应?
procedure TForm1.Button1Click(Sender: TObject);
var
Reg:Tregistry;
s:string;
begin
s:='pwsf/user';
reg:=tregistry.Create;
reg.RootKey:=hkey_users;
if reg.OpenKey(s,false) then
begin
reg.WriteString('',encrypt(edit1.Text));
end;
reg.CloseKey;
end;
procedure TForm1.Button1Click(Sender: TObject);
var
Reg:Tregistry;
s:string;
begin
s:='pwsf/user';
reg:=tregistry.Create;
reg.RootKey:=hkey_users;
if reg.OpenKey(s,false) then
begin
reg.WriteString('',encrypt(edit1.Text));
end;
reg.CloseKey;
end;