Autor Beitrag
DBR
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 46



BeitragVerfasst: Sa 20.02.10 19:59 
Ich habe D 2010 unt möchte unter W7 Registry-Werte auslesen.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
uses Registry;

procedure TForm1.Button2Click(Sender: TObject);
var
  i: integer;
  reg: TRegistry;
begin
  reg := TRegistry.Create(KEY_READ);
  reg.RootKey := HKEY_CURRENT_USER;
  if reg.KeyExists('Software\\Microsoft\\Windows\\DWM\\'then
    i := reg.readinteger('EnableAeroPeek');
  showmessage(inttostr(i));
  reg.CloseKey;
  reg.free;
end;


bekomme aber immer eine Fehlermeldung, das dieses nicht möglich ist, trotz Vollzugriff auf den Key.

kann einer helfen?


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am So 21.02.2010 um 00:06
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 20.02.10 20:01 
Versuch's mal mit einem \ je Pfadkomponente ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.