21-03-2011, 07:59 PM
السلام عليكم ورحمة الله
كود سورس لتعرف معلومات النظام عن طريق روجيستري
وبالتوفيق
كود سورس لتعرف معلومات النظام عن طريق روجيستري
وبالتوفيق
PHP كود :
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,registry, StdCtrls, ExtCtrls, XPMan;
type
TForm1 = class(TForm)
GroupBox1: TGroupBox;
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Panel2: TPanel;
Panel3: TPanel;
Label3: TLabel;
XPManifest1: TXPManifest;
GroupBox2: TGroupBox;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
reg:Tregistry;
begin
reg:=Tregistry.Create;
reg.RootKey := HKEY_LOCAL_MACHINE ;
try
reg.OpenKey('SOFTWARE\Microsoft\Windows NT\CurrentVersion',false);
Panel1.Caption:=reg.ReadString('ProductName');
Panel2.Caption:=reg.ReadString('CSDVersion');
Panel3.Caption:=reg.ReadString('ProductId');
except
end;
reg.Free
end;
end.

