procedure TForm1.Button2Click(Sender: TObject);
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
Reg.RootKey := HKEY_LOCAL_MACHINE;
Reg.OpenKey('Software/Microsoft/Windows NT/CurrentVersion', False);
Edit1.Text := '当前路径:' + Reg.CurrentPath;
Edit2.Text := '产品系列号:' + Reg.ReadString('ProductId');
Edit3.Text := '产品名:' + Reg.ReadString('ProductName');
Edit4.Text := '注册公司名称:' + Reg.ReadString('RegisteredOrganization');
Edit5.Text := '用户名:' + Reg.ReadString('RegisteredOwner');
Edit6.Text := '软件类型:' + Reg.ReadString('SoftwareType');
Reg.CloseKey;
Reg.Free;
end;