12-06-2012, 12:32 AM
DAMAX2010 كتب :sListBox1.Items.Add(ReadString('DisplayName'));
DisplayName غير موجودة :p
PHP كود :
procedure TForm1.FormCreate(Sender: TObject);
var
MyList: TStringList;
MyRegistry: TRegistry;
i: Integer;
begin
MyRegistry:=TRegistry.Create;
MyList:=TStringList.Create;
with MyRegistry do
begin
//RootKey:=HKEY_CURRENT_USER;
RootKey:=HKEY_LOCAL_MACHINE;
try
if OpenKey('\Software\Microsoft\Windows\CurrentVersion\Run',False)=True then GetValueNames(MyList);
for i:=0 to MyList.Count-1 do
lst1.Items.Add(ReadString(MyList[i]));
stat1.Panels[0].Text:='You have : '+IntToStr(MyList.Count) +' Programs Run at Windows Startup ';
finally
CloseKey;
MyList.Free;
end;
end;
end;
end.
بالتوفيق

